Somewhere in the middle of the U.S. Naval Surface Weapons Center, the Gunpowder Road Golf Course and the Patuxent River is an imaginary 15-mile line that is the official boundary between Montgomery and Prince George's counties.

In normal times, this line would be simply what it appears -- a dashed boundary on a map. But these days, as the state's political leaders redraw Maryland's legislative districts in accordance with the 1980 census, few things are as they seem: a river, a county line, even railroad tracks, become factors in the scramble to protect turf and ensure political survival.

For the last 10 years, the boundary between Prince George's and Montgomery counties has also served as a dividing line between legislative districts. Now that's going to change -- and the repercussions will probably determine how every line is drawn in the Maryland suburbs during the once-a-decade process called reapportionment.

The 1980 census figures showed a population shift away from the inner suburbs around Washington to booming areas of Howard County. As a result, Prince George's no longer has enough people to fill the eight districts it has held since 1970, but it is too large for only seven; Howard has grown from less than one but is not yet populous enough for two, and Montgomery has too many people for six but not enough for seven.

To solve the problem, the three counties will have to pool population and share districts for the first time. The question legislators have been wrestling with as they prepare a reapportionment plan everyone can agree on is where the district lines should be drawn and how many residents will be included from each county. In other words, which county will control them.

This is where the boundary lines becomes so important. Simply put, Montgomery, with its good government ethos, does not want to share with Prince George's, a county of bare-knuckles politics known in Annapolis for bully-boy tactics. The two counties feud constantly in Annapolis over dozens of local issues from education to sludge.

"Montgomery has been making it very clear that we smelled different and they didn't like us," said Prince George's Del. Timothy F. Maloney, one of the principal architects of his county's redistricting plans.

And the feeling is mutual. "The Montgomery County senators met for six hours," Sen. Victor Crawford, who lives near the county border with Prince George's and is the Montgomery senator most likely to be placed in a shared district, said recently. "And the only thing we could agree on was that we didn't want to share with Prince George's County."

Like most legislators, Crawford has become an expert at creative map drawing -- in a matter of seconds he can pencil in his county and the surrounding area on a scrap of paper, napkin or table top. "This," he says, slashing his pencil down a squiggle representing the Montgomery-Prince George's border, "is our Mason-Dixon Line."

Which is where Howard County enters the picture. In the last ten years it has doubled its population, enough to fill 1.3 districts, which in real political terms translates into a senator and three delegates in one district and one delegate in another.

No one disputes those facts. What they do argue over is a plan promoted by several prominent Howard politicians and civic activists from Columbia that takes advantage of the unwillingness of Prince George's and Montgomery legislators to share a district and puts two districts under Howard's control.

Dubbed the "toilet seat" plan by its detractors because of its shape on a map, it would create one district dominated by rural "out county" Howard connected to a smaller section in rural Montgomery and another district dominated by Columbia joined to the Laurel area.

The plan enraged Prince George's politicians, who understand the rules of power. Because Howard had come up with such a clever plan to circumvent the border dispute, Prince George's was forced to abandon its strategy of persuading Montgomery legislators to share a Takoma Park district or a tricounty district that Prince George's could control.

"Howard is like the mouse that roared," said a miffed Prince George's Sen. Arthur Dorman, "But as a result of the border dispute it creates a situation where little old Howard County gets two districts."

The "toilet seat" plan, which now resembles a sea serpent because of various political compromises inside Howard, is likely to be used by the state commission charged with presenting Gov. Harry Hughes with a reapportionment plan because it is the only proposal so far that creates districts for the three county's without breaching the "Mason--Dixon" line.

The commission will not give Hughes a recommended reapportionment plan until late November. In the meantime, politicians in all three counties have tried to adjust to the Howard proposal but in the process have discovered some problems.

The situation is worst in the 21st legislative district of northern Prince George's, where for the last 10 years Arthur Dorman has made his political career first as a delegate and now as a senator. Dorman lives in Beltsville but in election times does well in Laurel. Under the Howard plan he will lose most of Laurel -- as many as 38,000 people -- to a shared district.

The redistricting map drawn by the Prince George's delegation allows Dorman to make up this loss by simply moving south. Simple sounding, this change is rife with political conflict.

If Dorman moves into the University Park precinct, for instance, he runs into Sen. John J. Garrity, whose home district, the 22nd, was selected for elimination by Garrity's seven colleagues in a straightforward appliction of Darwinian principles.

"One district had to go. Jack was the weakest." said Prince George's Sen. Thomas V. Mike Miller. Besides, he added, "Jack wants to be a judge and we want for Jack what Jack wants."

The southward expansion of the 21st also affects two delegates in Dorman's district -- Tim Maloney and Pauline Menes, who will be joined in a new 21st District by two of their current House colleagues, Tom Mooney and Anthony Cicoria.

Mooney and Cicoria, however, are following an important principle of redistricting: They are examining other options. Mooney has been thinking about running for county council ever since he saw the census figures last spring.

The problems in other Prince George's districts are less severe. Sen. Tommie Broadwater, the county's only black senator, spent weeks fighting to hold onto the Enterprise Estate area where boxing star Sugar Ray Leonard lives, before his colleagues relented.

Sen. Edward Conroy was upset about losing two Democratic precincts in Upper Marlboro, where his law office is located, especially if he has to face Bowie's popular Republican mayor, Audrey Scott, in the next campaign. Sen. Thomas Patrick O'Reilly wanted a precinct in Lanham moved out of his district -- along with his 1978 primary election opponent, William Goodman.

"Everyone has an ax to grind in their own particular way," says a philosophical O'Reilly. "Naturally individuals when they have the opportunity to put the knife to someone, they'll do it."

In Montgomery County, redistricting is less onerous since no one is being forced to give up a seat, but it is still a tangled process. The county's problem is simply that the incumbent politicians, who are drawing the new plan, live in the south, while most of the new population is in the north around Gaithersburg and Montgomery Village.

A simple solution would be to push the six districts north and grab the needed people, but such logic runs into what Crawford calls the "Iron Wall" -- the municipal boundary of Rockville. Ten years ago the legislature approved a redistricting plan that split Rockville, which sits in the middle of the county, but city officials sued and the map was redrawn to keep the city together.

This time, Rockville's boundaries are "inviolate," Crawford says, "which causes a hell of a mess" since Montgomery's three most underpopulated districts, home to 12 incumbents, are located below it and therefore can move north only with extreme difficulty.

As a result, every legislator in the county has been drawing district lines that wrap around Rockville and nearby Gaithersburg but carefully avoid throwing incumbents together or out of their home districts. As House Majority Leader Donald Robertson put it: "We think that continuity of representation is important."

For now, the delegation has agreed on a map that moves three incumbents out of their home districts -- but that could still change. As Del. Joseph Ownes, one of those who will be moved along with five of his favorite precincts, said: "We have a little more participating democracy than in some of the counties. Participating democracy is not always the fastest type."

"Participating democracy" has been a factor -- though with a somewhat different twist -- in Howard County. There, the politicians from the old, rural sections of the county want to make sure they don't get drawn into a district with booming Columbia, a new town of civic activists equaled in vigor, numbers and intensity only by their Montgomery County counterparts. "Columbia is a bunch of activists who activate and salivate over anything," said Montgomery's Crawford. "They're our kind of people."

And most people in Columbia have been lobbying for a district to themselves. As a result, the "Toilet Seat" plan, with its Columbia district and its out-county district, has almost universal approval in Howard. But, as in the other two counties, the internal plan has required some "fine-tuning," as its architect Dennis Devaney, a prospective delegate and Columbia resident, puts it.

For the most part, fine-tuning has meant the simple adjustment of a small line here or boundary there. One change, however, has given Devaney first-hand knowledge of the way in which such things as borders and dotted lines take on political significance.

When Devaney first drew his plan, he placed a small neighborhood called Dorsey Search in the out-county district along with the rest of Howard's second election district. Very quickly, however, he learned that Dorsey Search was the home of Vernon Gray, a member of the Governor's Advisory Committee who is eyeing a run for the legislature but couldn't win in the conservative out-county district because he is black.

So Devaney sat down with a map, a big multicolor foldout of the entire county and began juggling lines -- whereupon he discovered how effectively map symbols can be used. "It was a little difficult to do draw lines around Dorsey Search because there weren't that many natural boundaries," said Devaney.

But by following a stream part way, an access road unknown to the Census Bureau and then a highway, he was able to do it and suddenly Dorsey Search was officially part of the Columbia district.