The US House of Representatives has passed a bill aimed at raising the country's debt limit.
Congress has been scrambling for enough support to push through an 11th-hour compromise to avoid the world's largest economy having to perform a humiliating default.
The 269-161 vote in the House came after Republican leaders spent the day urging conservatives to support the bill.
The Democrat-led Senate is likely to vote in favour of the legislation on Tuesday.
House speaker John Boehner said both the Republican and Democratic leaders of Congress "have a responsibility to bring sufficient votes to make sure it passes".
Gabrielle Giffords, the Congresswoman from Arizona who was shot in the head while meeting constituents in Tuscon in January, was in Washington for the vote.
It is believed to be the first time she has been back in Congress since the shooting.
Ms Giffords received a round of applause from her colleagues who crowded around her to shake her hand after the vote.
In a statement she said: "I have closely followed the debate over our debt ceiling and have been deeply disappointed at what's going on in Washington.
"After weeks of failed debate in Washington, I was pleased to see a solution to this crisis emerge.
"I strongly believe that crossing the aisle for the good of the American people is more important than party politics. I had to be here for this vote. I could not take the chance that my absence could crash our economy."
Earlier, President Barack Obama announced a deal had been struck between Democrats and Republicans to raise the debt ceiling.
Mr Obama said the agreement will cut about \$1trn (£610bn) over 10 years, reducing government spending to its lowest level since the 1950s.
A special congressional committee will be set up to find another \$1.5trn (£915bn) in savings by the end of December, the President added.
The last-minute deal, which will allow the US to increase its borrowing by \$2.1trn (£1.3 trillion), still has to be approved by Congress later today.
Officials believe this amount will be enough to last until 2013.
"The leaders of both parties in both chambers have reached an agreement that will reduce the deficit and avoid default," Mr Obama said.
"A default that would have had a devastating effect on our economy."
While Mr Obama welcomed the plan, he admitted it was not what he really wanted.
"Is this the deal I would have preferred? No," he told reporters.
"I believe that we could have made the tough choices required on entitlement reform and tax reform right now, rather than through a special congressional committee process.
"This process has been messy. It's taken far too long.
"I've been concerned about the impact that it's had on business confidence and consumer confidence, and the economy as a whole over the last month."
Both the House of Representatives and the Senate must agree on the deal.
If the US does not agree to increase the maximum debt level by Tuesday's midnight deadline the country will not have enough money to pay its bills.
Economists have claimed that defaulting on the debt could push the already fragile American economy back into recession.
The US was in danger of losing its AAA credit rating, which could have meant tax rises in the form of higher interest rates on mortgages and credit cards.
Mr Obama thanked the public for their phones calls, emails and Twitter messages encouraging and pressurising Washington to make a decision.
Republicans had insisted on deep spending cuts before they would consider raising the \$14.3trn (£8.7trn) limit on US borrowing, turning a normally routine legislative matter into a dangerous political impasse.
Sky's US correspondent Greg Milam said it was interesting that the deal was announced before the Asian financial markets opened.
US stock futures jumped and the dollar rebounded after news of the agreement was announced.
Although it will ease the immediate crisis, repercussions will be felt for years to come, Milam added.