A plan to legalize slot machine gambling won preliminary approval in the Maryland Senate yesterday, and slots opponents said they expect the measure to sail to final passage when the Senate votes today.

The bill then would move to the House of Delegates, where it faces fierce opposition from Speaker Michael E. Busch (D-Anne Arundel). Yesterday, Busch vowed to kill the bill by burying it in committee, setting the stage for a showdown with Gov. Robert L. Ehrlich Jr. (R) and Senate President Thomas V. Mike Miller Jr. (D-Prince George's) as the legislative session enters its final two weeks.

"The Senate president has the votes, and the train is headed down the track," said Sen. Brian E. Frosh (D-Montgomery), one of about a dozen senators who fought to derail the slots plan. "What happens after that, I don't know. It's going to be a battle of the titans."

The slots proposal is expected to raise as much as $1.5 billion a year, with the bulk of the cash split between Maryland public schools and the owners of four racetracks where the machines would be located. Its passage would amount to a major political victory for Ehrlich, who won election last year on a promise to wipe out a historic budget deficit with the help of slots revenue.

Evidence of the high stakes was on display as Senate debate began. Lobbyists representing track owners, casinos and horse racing interests looked down from the gallery, while a team of Ehrlich's aides pulled senators into a private lounge behind the chamber to ask for their votes.

Eventually, Ehrlich's team moved into Miller's office -- along with former state senator John A. Pica Jr., a lobbyist for the firm that has a contract to buy Rosecroft Raceway in Prince George's County -- and shut the door. Midway through the two-hour debate, the governor himself set up shop in Miller's office and summoned senators to chat about the bill.

Meanwhile, Miller worked the chamber from the Senate podium, trying to ensure that the bill would win approval by such an overwhelming margin in the final vote today that wavering House members might be persuaded to vote for it as well.

Ehrlich said their efforts appear to have been successful. "Tomorrow's going to be a pretty good vote," he said. "I'm pretty optimistic."

Slots opponents never got more than 18 votes in the 47-member chamber for a series of hostile amendments. Among their defeated proposals: submitting the gambling plan to voters as a proposed constitutional amendment in the 2004 election; auctioning off licenses for slot machine gambling to all bidders, including casinos; and increasing the share of the revenue earmarked for public schools from 46 percent to 64 percent, as Ehrlich had originally proposed.

The revenue amendment would have left track owners with 21 percent of the profits, an amount they say is insufficient to cover the costs of the new slots facilities. The current bill would give them 39 percent.

Sen. Paul G. Pinsky (D-Prince George's) argued that the current plan gives track owners far too much. After Senate leaders told him it was impossible to say how much the track owners would earn, Pinsky calculated their profits for himself.

According to his estimate, Pinsky said, the owners of Rosecroft stand to make as much as $32 million a year after expenses. Owners of a track that has yet to be built in Western Maryland would make about $9 million a year. And the company that owns Pimlico Race Course in Baltimore and Laurel Park in Anne Arundel County, Pinsky said, stands to earn $65 million a year.

Over the 15-year life of the gambling licenses, "these major players could get as much as $1.6 billion," Pinsky said. "For every million they receive, it's a million our children do not receive."

Slots backers derided Pinsky's revenue proposal as a "killer amendment" that would drive track owners away from the deal.

The amendment failed, but slots opponents did score a few small victories. One amendment would prohibit slot machines from proliferating in locations beyond the four tracks. Another softened a provision that would have required the state to pay for improvements to roads and mass transit so that as many as 11,000 people a day could reach the new gambling establishments.

Sen. Thomas M. Middleton (D-Charles) called the original provision "outrageous" at a time when needed transportation projects are on hold elsewhere because Ehrlich has drained more than $300 million from the state's transportation trust fund.

As the Senate battled over slots, the House gave final approval to a $22 billion plan to balance the budget by cutting deeper into state spending than Ehrlich had originally proposed. The House plan also includes an increase in the state property tax and new taxes and fees for some Maryland businesses, some of which Ehrlich proposed and has agreed to support.

The House budget does not rely on passage of the slots bill, which in any case would be unlikely to bring significant sums into state coffers until 2006.

"From my standpoint, our work is basically done," Busch said. "As far as I'm concerned, we can go home."

Miller, however, is still hoping to persuade Busch to approve the slots plan by persuading Ehrlich to sign a major tax increase to help close a nearly $1 billion budget gap looming when the General Assembly returns in January.

Busch said he might be willing to consider a slots plan that includes a statewide referendum if Miller can win the support of the Senate and the governor for a 1-cent increase in the sales tax and if the governor, in turn, can persuade House Republicans to go along with it. Otherwise, he said, he's not interested in any deals and "the slots plan is going in the drawer" -- Annapolis parlance for "dead."

House Minority Leader Alfred W. Redmer Jr. (R-Baltimore County) said his caucus will never go along with a tax increase. Ehrlich, too, appeared to dig in his heels, saying increases in the sales and income taxes are "non-starters."

"We're a long way from home," Miller conceded. "Hopefully, wise and cool heads will prevail and we'll do what's best for the state of Maryland."

Staff writer David Snyder contributed to this report.