WASHINGTON, D.C. (AP) UPDATE: President Barack Obama has signed a measure into law reopening the federal government and averting a potential default.
The White House says Obama signed the bill early Thursday, hours after the House gave final approval.
The White House budget office has already instructed federal workers to plan to return to work Thursday morning.
The measure restores funding for the government through Jan. 15 and extends the nation's borrowing authority through Feb. 7.
The partial government shutdown started Oct. 1. The U.S. was to reach its debt limit Thursday if no deal was reached.
As the deal neared final passage in the House Wednesday, Obama said it was now time for leaders in Washington to win back the trust of Americans that was lost during the debt-and-spending crisis.
UPDATE: Congress has passed legislation to reopen the partially-shuttered federal government and avert a potentially disastrous default on U.S. obligations, clearing the measure for President Barack Obama's promised signature.
Passage of the bill late Wednesday in the House and Senate ended a Washington-created crisis that closed much of government for 16 days. It came on the eve of the date the Treasury Department warned it would no longer be able to borrow to pay the government's bills.
The legislation was carried to passage in the House by strong support from Democrats and 87 yes votes from majority Republicans who had originally sought to use the measure to derail Obama's three-year-old health care law.
The legislation will reopen the government through Jan. 15 and permit Treasury to borrow normally through Feb. 7.
UPDATE: Obama thanks Senate for passing debt deal, pledges to sign it `immediately' after House vote.
The Senate has voted to avoid a financial default and reopen the government after a 16-day partial shutdown.
The vote was 81-18 Wednesday night. The measure now heads to the House, which is expected to back the bill before day's end.
Senate passage came several hours after Majority Leader Harry Reid and Minority Leader Mitch McConnell announced the bipartisan compromise.
The bill would reopen the government through Jan. 15 and permit the Treasury to borrow normally through Feb. 7 or perhaps a month longer.
Congress faced a deadline of 11:59 p.m. on Thursday. That's when Treasury Secretary Jacob Lew had said the government would reach the current $16.7 trillion debt limit and could no longer borrow to meet its obligations.