The Maryland Senate passed legislation Friday that would give Democrats in the Legislature more control over the governor's Cabinet appointments, a move that Republican lawmakers have called a "mean-spirited vendetta" aimed at ousting one of Gov. Robert L. Ehrlich's Cabinet secretaries.

The bill, which passed on a 29-18 roll-call vote, would require any governor elected to a second term to resubmit Cabinet secretaries to the Senate for approval. If passed by the House of Delegates in its current form, the bill would apply to Ehrlich's Cabinet, should he be re-elected in November.

"If a Cabinet secretary is not responsive to the needs of the citizens of Maryland, there needs to be a check and balance," Senate President Thomas V. Mike Miller Jr., D-Southern Maryland, said in justifying his bill.

But throughout a week of partisan bickering and political maneuvering, Republican senators argued that the real intent of the bill is to remove Secretary of Transportation Robert L. Flanagan from his post. Flanagan has recently fallen out of favor with Democratic lawmakers for failing to hand out $28.5 million in highway grants to counties and municipalities around the state.

"It's a mean-spirited vendetta against one person," said the Senate minority leader, J. Lowell Stoltzfus, R-Lower Shore. "A vote for this bill can be interpreted as partisanship in a very, very ugly way."

Flanagan shrugged off the idea that he is the target of Miller's bill.

"Maybe it's a way of relieving the stress of his (energy) deregulation blowing up in his face," Flanagan said, referring to looming electric rate hikes.

henry P. Fawell, an Ehrlich spokesman, called the bill "just another unilateral power grab" and a sure sign that Democrats believe that Ehrlich will be reelected.

"In the grand scheme of things, this bill is beyond trivial," Fawell said. "There are more important things to worry about than Senator Miller's own insecurities."

The final vote, which could have taken place as early as Wednesday, was delayed while a series of amendments was proposed.

First, Stoltzfus offered changes that would narrow the scope of the bill to apply only to Cabinet secretaries who have served for less than one year. As a result, Flanagan would have been exempt from the bill's provisions because he has served for three years.

The amendments, which effectively gutted the bill, were adopted without objection.

"My amendment was to kill the bill," he said. "I just think it's bad public policy. It's just wrong."

But the next day, Democrats, who said they misinterpreted Stoltzfus' changes, supplied their own amendments, returning the bill to its original form.

Four Democrats joined Republicans in voting against the bill, including Sen. James Brochin, D-Baltimore County.

"I'm not a big fan of Secretary Flanagan," Brochin said. "But just because I don't like the job he's doing, doesn't mean I'm going to vote for this. It's just bad public policy."

The bill will now go to the House of Delegates for approval, where Miller said he was unsure it had enough support for passage.

House Speaker Michael E. Busch, D-Anne Arundel, declined to comment on the bill's chances in his chamber, but did say that he would support it.

Even if his legislation isn't passed this year, Miller said he the General Assembly hasn't seen the last of it.

"Regardless of who the governor is next year, I promise I'll sponsor this bill again," he said. "It's good policy and it needs to be the law."