A hard-line Republican revolt could not prevent legislation to raise the US debt ceiling from clearing its first procedural hurdle in the House of Representatives on Tuesday evening. Here's how the drama is playing out on Capitol Hill and a guide to what comes next.
The two parties finally reached a deal after a showdown lasting months, then weeks of painstaking negotiations.
Now the two leaders - Democratic President Joe Biden and Republican Speaker of the House Kevin McCarthy - must sell their weekend agreement to their members of Congress. They believe that even with some defections on the left and right, they have the votes to pass a bill before the deadline.
The Treasury has moved the day the US would hit its borrowing limit to Monday 5 June.
For the moment financial markets appear to have calmed as the prospect recedes of the global economic chaos that would result from the world's biggest economy defaulting on its $31.4 trillion (£25tn) debt.
That could quickly change, however, if the multi-step process for approving the debt-limit agreement is derailed or otherwise blocked in the days ahead.
The deal introduces new federal spending limits and restrictions on low-income aid programmes in exchange for a debt-limit increase.