Lawmakers narrowly averted a government shutdown late Thursday night while advancing a $1 trillion spending package after a dramatic day on Capitol Hill in which House members of both parties raised a litany of objections to the measure.
The Republican-controlled House of Representatives voted 219-206 to approve the controversial bill, which had appeared in jeopardy for much of the day. It now goes to the Senate for consideration. Both chambers approved a separate, stopgap budget to keep federal agencies open while the Senate deliberates.
"It was well debated, and the vote speaks now for itself," Sen. Barbara A. Mikulski of Maryland, a chief architect of the legislation as the Senate Appropriations Committee chairwoman, said shortly after the House vote. "The House has done their job, now I hope that we do our job."
Maryland, with an economy tied more closely to Washington than many other states, would receive millions more for the Red Line and the port of Baltimore. The bill also includes additional money to confront the Ebola crises in West Africa, to care for veterans and to deal with Islamic State fighters in Syria and Iraq.
But the measure cleared the House only narrowly after Democrats objected to several policy riders, including language to expand the amount of money donors could give to political campaigns as well as changes to the Wall Street regulation bill passed in 2010 to avoid another economic meltdown.
As the bill appeared to falter — and House Democratic leaders said emphatically that they would not pressure members of their own party to join Republicans on the bill — President Barack Obama and senior White House officials were personally whipping up support for the measure.
The intervention set up an uncomfortable split with House Minority Leader Nancy Pelosi, who was trying to use Democratic opposition as leverage to force House Speaker John Boehner to jettison the controversial provisions on campaign finance and derivatives.
The vote split both parties, including in Maryland's usually cohesive congressional delegation. In the end, 57 Democrats joined 162 Republicans to support the bill. The state's more centrist Democrats, Reps. C.A. Dutch Ruppersberger, Steny Hoyer and John Delaney, voted for the bill; while the more liberal members, Reps. John Sarbanes, Donna Edwards, Elijah Cummings and Chris Van Hollen opposed it.
Rep. Andy Harris, the state delegation's sole Republican, also supported the bill. Harris successfully pressed to include language that would block attempts to legalize marijuana in the District of Columbia.
"I don't agree with everything in this bill but, on balance, I believe that it is better for Maryland than the alternative," said Delaney, the state's newest lawmaker in Congress, whose district is home to many federal employees. "I support keeping the government open."
The outcome ended one chapter in a budget drama that lawmakers have largely managed to avoid since last fall, when Congress allowed the government to shut down for 16 days after failing to reach a funding agreement. Since then, a divided Congress has repeatedly struck bipartisan deals to keep federal agencies open and generally maintain status quo in spending.
But the brinksmanship carried echoes of past budget meltdowns, with the Obama administration suddenly thrust into the position of preparing agencies for a possible shuttering. The Office of Management and Budget said it called a conference call to warn agency leaders of the possibility that the government's spending authority could run out at midnight.
The outcome represented a significant, if temporary victory for Mikulski, who helped to craft the deal that a majority of rank-and-file House Democrats ultimately rejected. Now, Mikulski and other Democratic leaders must wrangle that bill through the Democratic-controlled Senate before handing the chamber over to the new Republican majority next year.
Still, leaders of both parties celebrated the outcome late Thursday.
"My job tonight is to say thank you and Merry Christmas," Boehner said in closing the House session.
The quick passage of the bill before the holiday break that Boehner had expected turned into a game of chicken as the chamber recessed for hours and lawmakers huddled in backroom talks.
By early evening, White House Chief of Staff Denis McDonough rushed to the Capitol to meet with House Democrats. He told them the White House also felt blindsided by the provisions and had asked Senate Democrats to help remove them from the bill.
"We learned about these provisions when you did, and we pushed the Senate to take them out," McDonough told House Democrats, according to a person inside the meeting who did not want to be identified discussing the private session.
If approved by the Senate, the bill would keep federal agencies — except for the Department of Homeland Security — running until the end of September. Some Republicans wanted to put Homeland Security on a shorter timeline in order to weigh options for attempting to roll back Obama's recent executive actions on immigration.
Economists have long warned that Maryland would be hurt more by a shutdown for the same reason that it experienced less economic pain during the recession: its ties to the federal government. The state is home to about 300,000 federal employees — about 10 percent of its civilian workforce — and the government spent $93 billion in Maryland last year.
Also Thursday, the Senate advanced a must-pass defense authorization bill, which includes a massive public-lands package that has angered some environmentalists. Democrats and Republicans agreed 85-14 to move the bill forward, with final passage expected today.
The bill includes a provision that would create the Harriet Tubman Underground Railroad National Historical Parks on the Eastern Shore and in New York.
Tribune Newspapers' Washington bureau contributed to this article.