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."

He went on: "This is the time. They really need us. … If everything falls apart we can say we got three new high schools. We got a hospital. We got a brand new arena."

Baltimore Mayor Stephanie Rawlings-Blake — in Annapolis for the second time that day — stepped into the conversation with her pitch, trying to convince delegates on the merits of the gambling bill.

The legislation, which would also clear the way for table games like poker in Baltimore, would let the city's casino developer create "an entertainment hub" off Russell Street. If lawmakers accept the status quo, the new casino will be just "a slots barn," she said.

The meeting broke up — and members headed back to the House floor, where they continued voting.

Later Monday evening, an effort to secure the Baltimore County delegation's votes for gambling led to a call for the members of the House Ways and Means Committee members to leave the floor. They needed to vote on a controversial bill that would allow some members of the county school board to be elected, rather than appointed by the governor.

It was another hotly contested issue that was considered settled and dead for the year, but was now again in play.

House Ways and Means Committee Chairwoman Sheila Hixson had said firmly that she wouldn't let the bill out of her committee. Baltimore County Executive Kevin Kamenetz strongly opposed it, believing that an elected school board wouldn't be as diverse as one that was appointed, and Hixson wasn't going to interfere.

But leaders of the 23-member Baltimore County delegation desperately wanted the bill. They saw an opening.

"There was a sentiment that people, members of the delegation, were inclined to be supportive of the gambling bill, said Del. John Olszewski Jr., the delegation chairman. "But they wanted to see some action on this local bill."

The Ways and Means Committee approved the school board bill, sending it to the House floor for a final vote, shortly before midnight. But — like the gambling and tax bills — it never got a vote before the gavel dropped to adjourn.

Much of the city's deal collapsed then, too. Though delegates had won approval of legislation containing the convention center study, the school bonding authority was lost with the budget deal.