About 10:30 p.m. Monday, House Speaker Michael E. Busch walked across the State House and delivered a grim message to Senate President Thomas V. Mike Miller: There weren't enough votes in the House to pass the gambling bill.

Everything was unraveling.

The legislature's leaders had spent the day crafting a deal. The Senate would agree to the House approach to raising income taxes. The House would pass, or at least attempt to pass, a gambling bill that was a high priority for Miller.

But by midnight, the Maryland General Assembly adjourned on its last day without taking a final vote on either bill — leaving the state with a "doomsday" budget built on hundreds of millions of dollars in cuts that neither leader wants. The bruised feelings that resulted from Monday's failure are likely to make it that much more difficult to find a solution to the budget mess.

Miller has said that Busch assured him he could deliver the gambling vote. "We made an agreement we were going to pass the gambling bill," Miller said. Busch disputes that, though it is clear he was trying to round up votes for the measure.

But the House speaker couldn't deliver the votes on a bill to allow a sixth casino in Maryland, partly because some blocs of delegates saw an opportunity late in the game to try to gain something for their local constituents in return for their votes.

Side issues long considered dead in the Assembly session suddenly came to the forefront, including the composition of the Baltimore County school board and the Baltimore school system's ability to finance renovations. The message to the speaker was clear as the night wore on — entire delegations in his Democratic caucus were withholding their votes on the gambling bill.

Should a bill to allow a sixth casino in Maryland be part of a special session, there's every reason to believe the delegations will pile on to the demands already made.

"To the extent we are able to serve our county, everything would be on the table," said Del. Brian Feldman, the chair of the 24-member Montgomery County delegation. "We have a large county. It did appear there were a fair number who were inclined to be opposed to the gambling bill."

Feldman said his delegates didn't make any demands in exchange for gambling votes.

Others did.

The Baltimore city delegation clearly laid out its demands during an 8 a.m. meeting in Annapolis Monday. They did it again in front of a bank of TV cameras at a 10 a.m. news conference. The 18 city lawmakers would stand united.

Topping their list was $100 million in additional bonding authority for the city school system, an idea that had been floated earlier in the session but had been killed by an Annapolis committee, mostly out of a desire to rein in overall state borrowing.

One city lawmaker said the money could provide air conditioning for every single classroom.

The group also wanted to restore $2.5 million in the capital budget to study the expansion of the city's convention center. The money was stripped from the capital spending plan at the last moment, and city delegates were fuming.

By Monday night, Del. Curt Anderson, the Baltimore House delegation's chair, gathered his 17 colleagues in the Silver Room on the first floor of the State House.

The city tentatively had a deal. All the demands had been met. But Anderson wanted his delegates to hold their votes on gambling bill until the city's deal was firmly in place. "I'm asking you not to give any commitment until I let you know we are sure," Anderson said.

Others saw an opportunity to get more.

"This is going to be a very, very heavy lift," said Del. Shawn Z. Tarrant, using Annapolis slang for a tough vote. "I don't think we should give away our votes and not get something extra."