<img height="1" width="1" style="display:none" src="http://b.scorecardresearch.com/p?c1=2&amp;c2=15743189&amp;cv=2.0&amp;cj=1&amp;&amp;c5=&amp;c15=">

Congress OKs spending, debt deal just hours before government was to default

With a 285-144 vote, the legislation now moves to the desk of President Obama, who earlier Wednesday pledged to swiftly sign it. (Photo by T.J. Kirkpatrick/Getty Images)

A 16-day government shutdown came to an end late Wednesday when the Senate and then the House approved a compromise that immediately reopened the government and extended the nation's debt ceiling just hours before the Treasury said the government would default.

The House approved the measure 285-144, sending it on to President Obama, who signed it early Thursday morning. The Senate approved the compromise its leaders crafted on an 81-18 vote.

"The bill before us tonight allows us to move on," House Appropriations Chairman Hal Rogers, R-Ky., said during a half-hour debate on the bill. "It allows Congress to address the broader picture, what the drivers of our real debt are and how we avoid staggering from fiscal crisis to fiscal crisis."

Obama praised the deal and immediately ended the government shutdown that Standard and Poor's said cost the U.S. economy $24 billion.

"We can begin to lift this cloud of uncertainty from our businesses and from the American people," Obama said in a White House appearance before the House vote.

The legislation funds the federal government until Jan. 15 and extends the borrowing authority of the treasury until Feb. 7. The current debt limit expired at midnight, barely two hours after the House voted.

The compromise, however, provides only a temporary solution to the weeks-long budget battle, virtually guaranteeing another showdown in just a few weeks unless the Republican House and Democratic Senate can agree on a long-term budget.

The House and Senate separately agreed to establish a bicameral budget conference to work out an extended budget plan by Dec. 13.

The 11th-hour votes will allow the government to reopen after 16 days, ending the public sagas over closed national parks, furloughed federal workers and unpaid Capitol Police.

During the brief debate, Democrats point fingers of blame at the GOP for the shutdown caused by a group of conservative Republicans who refused to vote for any spending bill that failed to defund Obamacare.

"My colleagues, do you think your recklessness was worth $24 billion to our economy?" House Minority Leader Nancy Pelosi, D-Calif., asked.

To many House members, however, the fight was worth it.

"I would never regret standing on principle," said Rep. Steven King, R-Iowa, a leader of the defunding effort who voted against the final compromise.

Sen. Ted Cruz, R-Texas, who spearheaded the fight in the Senate and conducted a nearly 22-hour floor speech against the health care law, called the final compromise "a terrible deal."

Despite his party leaders' claims that the goal was unachievable, Cruz insists that Obamacare could have be defunded, but only if Senate Republicans had backed their counterparts in the House.

The final bill included only a small victory for the anti-Obamacare conservatives. The federal government will be required to verify the income of anyone applying for a government insurance subsidy.

Democrats also prevailed on the debt ceiling, winning a longer extension than the GOP wanted without any of the spending cuts Republicans wanted to offset the increase.The bill also preserves the authority of the Treasury to shuffle funding around to extend borrowing power beyond the Feb. 7 date, power Republicans had hoped to take away from the administration.

On the spending side, Republicans won, but only temporarily. The government funding provision preserved the $986 billion spending cap mandated by the 2011 Budget Control Act, but only until Jan. 15 when the measure expires.

Democrats are determined to restore the sequester-imposed budget cuts and increase funding levels to $1.05 trillion.

"This number is too low," Pelosi said Wednesday of the current spending cap.