Gov. Robert L. Ehrlich Jr. faces the biggest test so far of his influence with the legislature when the Senate likely decides today if Lynn Y. Buhl will be confirmed as environmental secretary.

The showdown takes place after weekend negotiations between Ehrlich and Sen. Brian E. Frosh, Buhl's leading critic, broke down without any agreement -- though they continued meeting last night in hopes of forging a deal.

"It could be nasty," said Sen. J. Robert Hooper, a Harford County Republican backing Buhl.

Republican leaders believe they have at least 20 of the 24 votes needed to confirm Buhl, who has been fighting for her position since the Senate Executive Nominations Committee voted to reject her March 3.

But the GOP administration is struggling to get the last four votes, meaning a half-dozen undecided Democratic senators probably will decide whether Buhl becomes head of the Department of the Environment.

Yesterday, both sides kept up the pressure on undecided senators -- including warnings from Republicans that two Baltimore County Democratic senators could pay a steep political price if they vote against Buhl.

Publicly, the administration remained optimistic yesterday that its nominee will be confirmed. Privately, it began discussing strategies for a defeat.

One option under consideration would be to leave the secretary's position vacant, meaning that a former businessman, Kendl P. Philbrick, the agency's deputy secretary, could become the acting secretary. Another option would be to name Buhl as deputy secretary, a position that does not require Senate confirmation.

"It would be difficult, if not impossible, to find someone else to subject themselves to this process," said Ehrlich spokesman Paul E. Schurick.

Some Democratic senators and environmental activists have been trying to derail Buhl's nomination because of concerns she would be unfriendly to Maryland's environment.

Ehrlich and Republican leaders have countered that the governor should be able to appoint his own people and that Buhl -- a former midlevel administrator in the Michigan Department of Environmental Quality -- is qualified to head an agency responsible for protecting the state's air and water.

After escalating tensions last week, Ehrlich and Frosh, a Montgomery County Democrat, held two phone conversations over the weekend to try to compromise.

Officials said Frosh offered to drop his opposition to Buhl in exchange for being able to name other environmental officials, including the next chairman of the Critical Area Commission.

Ehrlich rejected that idea. "He outlined a proposal that was completely unacceptable," Schurick said.

Ehrlich offered to replace Philbrick with a deputy secretary supported by the state's environmental community, but Frosh dismissed the idea last week.

Frosh declined yesterday to comment on the negotiations. "It doesn't look like we have a deal," Frosh said. "I am confident she won't be confirmed."

Both sides appear to be targeting a group of undecided Democratic senators, including Katherine A. Klausmeier of Baltimore County, Patrick J. Hogan of Montgomery County and George W. Della Jr. of Baltimore.

Sen. E.J. Pipkin, an Eastern Shore Republican who campaigned last year on a pro-environment platform, is also said to be wavering.

Ehrlich and Buhl spent much of last week making personal appeals and offering deals to undecided senators, and they continued to do so yesterday.