Senate Majority Leader Harry M. Reid (D-Nev.) and Minority Leader Mitch McConnell (R-Ky.) announced a bipartisan deal on Wednesday to raise the debt limit through Feb. 7 and end the 16-day-old government shutdown.

The bill must be passed by both the Senate and the House of Representatives, and signed by the president, and it is unclear whether all that can happen before the Treasury Department exhausts its borrowing power Thursday.

It avoids any major concessions on Obama’s signature Affordable Care Act, a major victory for Democrats and a repudiation to House and Senate Republicans who for weeks tried to use the threat of a shutdown and potential default to force changes in the health-care law.