In a cluttered, book-lined office on the second floor of the state house here, one of Gov. Harry Hughes' little-known advisers has quietly begun working on a task that, within a year, will make him the most sought-after bureaucrat in Maryland.

George W. Liebmann, a slim, bespectacled attorney who says he shuns political intrigue, is in charge of what has always been the most intensely political task of state government -- reapportionment, or the art of reshaping Maryland's election districts every 10 years to reflect population shifts.

Officially, reapportionment work here cannot begin until April of next year, when the results of the 1980 census in Maryland will be complete. The most visible political handwringing over the new boundaries, which are expected to make or break the careers of a number of legislators, will not appear until the following year, when Hughes will submit a reapportionment plan to the General Assembly.

Such is the nature of this delicate and frequently byzantine process, though, that in Annapolis and throughout the state, legislators and political operatives already are quietly planning and maneuvering for what is to come.

The state's reapportionment history shows clearly what could happen. The state election districts of both the 1960s and the 1970s were ultimately drawn by appeals-court judges, who took over after the legislature's plans were beseiged by lawsuits charging irregularities.

One suit that caused the courts to take over the state's legislative redistricting in 1973, for example, was filed by Newton Steers, then the only Republican state senator from the Washington suburbs. The plan drawn up by Gov. Marvin Mandel -- with the help of Montgomery's Democratic delegation -- had altered Steers' district to include four more precincts -- all of them heavily Democratic.

As the next round of map-drawing approaches, the current lone Republican senator from the Washington area, Howard Denis, already is traveling around the country to participate in seminars on redistricting laws, in anticipation of the lawsuit he believes he may have to file.

"The General Assembly has never had the ability to separate its vested interests from constitutional principles in this area," Denis says. "All those good-government Democrats who come here to enact reforms suddenly revert to the primeval past when it comes to reapportionment."

Even without the partisan theatrics Denis expects, the new redistricting in Maryland, Liebmann and legislative leaders say, is likely to make drastic changes in political alignments and alliances in the state, at least on the legislative level.

The most important changes -- and the most significant to the future of state politics -- will occur in Baltimore City, where a shrinking population may cost the city at least one and perhaps two of its 11 state senators, and three or six delegates.

"The loss could be catastrophic in terms of the city's political clout, and there is certain to be internal fighting in the delegation," said one of Baltimore's senior senators, Julian Lapides. "There's nothing like reapportionment to bring out the worst in us."

Already, in the view of some legislators, Baltimore's expected loss of votes in the legislature is subtly influencing the tactics of the legislature's most powerful delegation.

This year, Baltimore's delegates and senators are campaigning in full force for new funds for the city's police, schools, port and roads. They are also expected to put their collective powers of influence and vote-swapping behind a plan to finance a $20 million renovation of Memorial Stadium.

"The fact is that the city's delegation is trying to grab everything they want now, before it's too late," said Denis. "Their anticipation of a loss of power is going to warp the legislative process for the next two years."

Meanwhile, Baltimore's mayor, William D. Schaefer, is doing everything he can to ensure that as many Baltimoreans as possible are counted during the census in April. The city has started a public-relations campaign to inform its citizens of the census days, and is considering redrawing some of the current precinct lines to make federal tabulations more precise.

Baltimore's legislators, on the other hand, are already talking up the idea of expanding some of the city's election districts into adjacent Baltimore County -- rather than eliminating one or two -- so that 11 senators will still have to represent the city's interests, if only partially.

While Baltimore's influence shrinks, the representation -- and consequent political impact -- of several of the state's smaller counties is likely to increase, according to legislative leaders studying the matter. Howard and Charles counties are considered the jurisdictions most likely to gain.

Montgomery County is also expected to redraw some important boundaries, giving the northern end of the county, particularly around Gaithersburg, more influence in elections while the inner-Beltway districts expand and dilute the political importance of areas such as Silver Spring.

In the end, what happens to the state's political districts -- and how it happens -- is likely to be determined by the extent to which Hughes, advertised as the state's least political governor in a generation, will adopt the tactics of redistricting used by his predecessors.

"All we have agreed on is to keep in touch with each other in this and to let the other know before we do something," says House Speaker Benjamin Cardin (D-Baltimore City), who has already talked with Hughes and the leaders of the legislative delegations about how reapportionment will be carried out. "We're not sure yet how it will be done -- except hopefully, fairly," says Liebmann.

One thing, however, is sure: reapportionment, by the choice of the legislature, will remain a political event. A proposal to give redistricting powers to an independent commission this time has been introduced in the state Senate this year. It is not even expected to reach the Senate floor for debate.