The US has avoided a feared and catastrophic default on the American debt, as the government passed a measure that ties an agreement to raise its capacity to borrow to steep spending cuts.
President Barack Obama quickly signed it into law on Tuesday night after the Senate passed the measure.
The emergency Bill increases the nation's 14.3 trillion-dollar (£8.8 trillion) cap on borrowing, avoiding default just hours before the midnight deadline, and begins the process of curbing the country's spiralling debt.
The administration had said the government could not pay all its bills without the new borrowing authority and it warned that default would severely damage the global economy and push the US back into recession or worse.
Even with the legislation now in place, there are fears that the last-minute sparring could shake rating agencies' confidence and harm the country's Triple-A credit rating.
Though the compromise deal passed, it deeply angered both conservative Republicans and liberal Democrats. Many Republicans contended the Bill still would cut too little from federal spending; many Democrats said much too much.
A deeply frustrated Mr Obama, while praising Congress for finally passing the compromise Bill, demanded legislators immediately turn their attention to fixing the economy and creating jobs. "We've got to do everything in our power to grow this economy and put America back to work," he said, shortly after the Senate voted 74-26 to pass the measure.
He also said he was not giving up on his insistence that Congress allow taxes to be raised on big corporations, through an end to loopholes, and the richest Americans once both houses return from their summer recess in early September. The measure that now becomes law relies wholly on cutting spending as a tool for lowering the American deficit.
"We can't balance the budget on the backs of the people who've borne the brunt of this recession," the president said.
Polls showed Americans largely supported Mr Obama's contention that taxes need to be raised for those earning incomes above 250,000 dollars (£153,000), while revoking loopholes that benefit hugely profitable oil companies and operators of hedge funds. Nevertheless, the extended and bitter fight over raising the debt ceiling, a routine matter for in past Congresses, damaged the standing of Mr Obama and politicians.