Despairing Montgomery County senators saw the entire 90-day legislative session pass before their eyes when Sen. James Simpson (D-Southern Maryland) took to the floor Monday to denounce a local bill they were counting on.

By unspoken legislative rule, bills that affect a single jurisdiction are supposed to be sacrosanct. But the delegation's innocuous-sounding sediment control measure got caught up in last-minute politics as the General Assembly wound to a close this week.

Simpson argued that the bill, allowing the county to assume new authority over sediment and erosion control plans previously controlled by the state, would gut the enforcement powers of state conservation officers and undermine the entire soil conservation district concept.

Simpson was joined by other rural senators in opposing the measure, but some of his colleagues and Montgomery County lobbyists speculated that the controversy over such a limited bill had more to do with politicians paying each other back for previous slights than with the merits of the legislation.

After the dust settled, the sediment control bill passed anyway, but by a narrow margin.

Dozens of other local measures sponsored by Prince George's and Montgomery County delegates received swifter legislative approval this session, including $5.5 million in magnet school funding for Prince George's and $11.5 million in school construction funding for Montgomery. The biggest victory belonged to Montgomery County Sen. Stuart Bainum Jr., whose bill to deny a tax exemption to the all-male Burning Tree Club finally made it to the governor's desk.

It was during the session's final days that the crunch came, and local elected officials dealt with the pressure in different ways.

During one afternoon House session, Del. Timothy Maloney (D-Prince George's) was passed a slip of paper with the delegation's roll call vote on another local bill. Instead of recording his vote and passing it on, he balled the paper up, popped it into his mouth and began to chew.

He showed the damp, wadded up roll call vote to a reporter later. "I didn't like the way the vote was going," he explained.

Yet in one unusual example of political cooperation in the final days of the session, a hastily drafted Prince George's measure was introduced and rushed through in a single week.

That bill, which would allow the County Council to establish a student loan authority for Prince George's County residents, was enacted late Monday, a mere seven days after County Executive Parris Glendening and Greater Washington Board of Trade President Peter F. O'Malley came to town to sell the local delegation on the idea.

The measure did have its critics, several of whom complained that it slid through the committees and chambers of the General Assembly far too quickly -- with only one full hearing and no debate at all in the Senate.

"It's really not a local bill," said Del. Howard P. Rawlings (D-Baltimore). "The bill has statewide implications."

O'Malley, however, said that Prince George's has "gotten ahead of the curve" on providing financial assistance to middle-income students and that other local jurisdictions will want to create similar programs once they see how well the one in Prince George's works.

Prince George's and Montgomery officials and lobbyists said in interviews this week that they were satisfied with the outcome of the 1986 session.

Ida G. Ruben, Democratic head of the Montgomery House delegation, said there was victory in what was blocked as well in what was passed.

For instance, a $335 million local education aid package, lobbied for heavily by House Speaker Benjamin L. Cardin (D-Baltimore), fell victim to a House-Senate standoff during the session's final hours. Cardin was disappointed, but Ruben and other Montgomery County delegates were elated.

Ruben said Montgomery County unfairly bears the brunt of the cost for such programs because it is one of the state's wealthiest jurisdictions. But those formulas seldom take into account the higher costs that come with living in suburban Washington, she said.

"In the Washington metropolitan area, it costs more to purchase services than in Somerset County," Ruben said. "That's been our big gripe."

There were other, more clear-cut victories for Montgomery County this session.

The legislature gave its stamp of approval to two local bills that would shift planning and development powers from the County Council to the county executive's office.

One measure would give County Executive Charles W. Gilchrist's successor the right to appoint two members of the county planning board. The other will give the county executive veto power over master plans, a basic blueprint for zoning.

In Prince George's, planning and zoning bills also occupied much of the delegation's time. Early in the year, delegates summarily rejected a controversial zoning measure opposed by developers and county officials who argued that it would deprive the county of flexibility in deciding on large-scale rezoning requests.

Opponents of the measure, who vowed to revive the perennial bill next year, said that it would give county residents a greater voice in the zoning process at a time when massive new development projects such as Konterra near Laurel and PortAmerica near the Woodrow Wilson Bridge are taking shape.

But the citizens groups did gain a victory during the last several days when the legislature enacted a bill, over the objections of County Executive Parris Glendening and developers, that eliminates a planning tool known as cluster zoning.

As the law now stands, developers can receive permission to group, or cluster, buildings in a limited area on properly zoned land without going back to the planning board for additional approval.

Prince George's County lobbyist Royal Hart said the bill that the General Assembly approved this week will encumber the zoning process and discourage developers from building the less expensive clustered housing.

On Tuesday, the Prince George's County Council wrote Gov. Harry Hughes, urging him to veto the legislation. The letter said the bill flies in the face of state law and local government's responsibility in land-use decisions.