Baltimore schools chief Andrés Alonso went to Annapolis last year seeking approval for a bold $2 billion plan to replace many of the city system's crumbling buildings. The idea didn't even make it out of committee.

Prospects still looked bleak in January when the Senate president described the financial package as "ridiculous." But by the end of the legislative session in April, a $1 billion version of the proposal had cleared both chambers by overwhelming margins.

The plan — signed into law Thursday by Gov. Martin O'Malley — went from ridiculous to reality because of hard work by scores of people in both Baltimore and Annapolis, and a host of political forces were in play. But three stand out: a House leader who wanted to support his members as well as his hometown, a search for votes on an unrelated tax bill, and a burgeoning conviction that giving Baltimore children a better place to go to school was the right thing to do.

"The school construction will be to our neighborhoods what the Inner Harbor is to downtown," said Rob English of the community group BUILD, which lobbied for the bill. The money — the largest commitment of state funds to a single school district in Maryland's history — will finance 15 new schools in Baltimore and fully renovate another 35.

In interviews with more than a dozen key players, all agreed the plan had a powerful champion in House Speaker Michael E. Busch. From the first day of the session until it reached final passage, he pushed it hard.

Though he now represents Anne Arundel County, Busch grew up in Baltimore and attended city schools. He says that by helping to improve the city system, the state will improve the economy of the entire region.

"We think it's going to attract families back to the city," he said recently. "For the state to be successful, Baltimore City has to be successful."

For Busch, the drive to pass the program was a matter of politics as well as policy. Baltimore's all-Democratic delegation is a vital part of his base in the House of Delegates. During last summer's special session on gambling, he asked the city's 18 members to take a hard vote in favor of a bill expanding casinos in Maryland.

Most did. But the city lawmakers took the opportunity to remind him that their No. 1 priority for this year's session would be Baltimore's schools. Busch didn't become the longest-serving speaker in Maryland history by failing to deliver.

Across the aisle, Senate President Thomas V. Mike Miller had concerns of his own. He, too, had a Baltimore delegation that was urging him to support the schools bill. And the Calvert County Democrat had something he wanted very much from the session — an increase in gasoline taxes to pay for Maryland's stagnating transportation network. It was a deeply unpopular proposal, but one Miller believed was necessary for the state's economy and quality of life.

If school construction is the No. 1 priority in Baltimore, transportation ranks at the top in the Washington suburbs. Few lawmakers spoke openly of the developing dynamic, but gradually it became clear that the proposals would stand or fall together. Without Baltimore votes, no gas tax increase would pass. Without school construction, the gas tax votes were not assured.

On the surface, Busch was the ardent cheerleader for school construction and Miller the skeptic. Behind the scenes, the presiding officers were closer in their views than they let on.

Miller wanted to find a way to make the school plan palatable to his members. Busch became convinced a gas tax increase could not wait another year — especially after rival Virginia's Republican-led legislature approved a transportation revenue package in February.

Both men had concerns about the school financing proposal. The city plan — developed by Alonso in consultation with education activists and backed by Mayor Stephanie Rawlings-Blake — relied on a guaranteed yearly block grant from the state to the school system. A new city school construction authority would oversee $1.2 billion in work over six years, the first phase of a $2.4 billion program over 10 years.

The plan called for a commitment of roughly $32 million a year from the state's school construction program, plus matching city money from the mayor's new bottle tax and anticipated revenues from table games at a downtown casino. The money would let the school system float bonds to pay for new school buildings.

But because the state construction program is itself funded by bonds, the plan in effect meant using debt to pay off debt — a scheme that some compared to paying one's MasterCard bill with a Visa card.

"No one felt comfortable with the idea of borrowing debt on debt," Busch said. "The real question was how do you find a stable funding source that was going to be acceptable to the bond markets?"

He asked his staff to explore alternatives.

What followed, Busch said, were weeks of "continuous dialogue" involving key aides, including his chief of staff, Kristin Jones, and Miller's, Victoria Gruber. The governor's new chief legislative officer, Stacy Mayer, kept tabs on the talks.

At the center of the negotiations was Rachel Hise, an analyst with the Department of Legislative Services. Hise, who has played a key role in every important debate over Maryland education policy for the past 20 years, was described by participants on all sides as an indispensable honest broker among the various players