US President Donald Trump on Sunday signed into law a $2.3 trillion pandemic aid and spending package, restoring unemployment benefits to millions of Americans and avoiding a federal government shutdown.
Mr Trump, who leaves office on January 20 after losing November's election to Joe Biden, backed down from his threat to block the bill after intense pressure from politicians on both sides.
The bill was approved by Congress last week.
The Republican president had demanded that Congress change the bill to increase the size of stimulus cheques for struggling Americans from $600 to $2,000, and cut some other spending.
He played golf on Sunday out of public view as a government crisis loomed.
It was not clear why Mr Trump, who has refused to concede defeat to Mr Biden, changed his mind on the stimulus package.
His resistance had threatened to bring further chaos into the final days of his presidency.
White House officials have been quiet but one source said some advisers urged him to relent because they did not see the point of refusing.
Democrats are on board with the $2,000 payments but many Republicans have opposed it.
Many economists agree the financial aid in the bill should be higher to get the economy moving again but say immediate support for Americans hit by coronavirus lockdowns is urgently needed.
Unemployment benefits being paid to about 14 million people through pandemic programmes lapsed on Saturday, but will be restarted now that Mr Trump has signed the bill.
The package includes $1.4tn in spending to fund government agencies.
If Mr Trump had not signed the legislation, a partial government shutdown would have begun on Tuesday, which would have put millions of government workers' incomes at risk.
His abrupt move to sign the bill came after most Republican legislators refused to back his call for changes to legislation on which they had already voted.
Hours earlier, Pat Toomey, a Republican senator from Pennsylvania, told Fox News that Mr Trump wanted "to be remembered for advocating for big cheques".
"But the danger is he’ll be remembered for chaos and misery and erratic behaviour if he allows this to expire," Mr Toomey said.
Republican officials were relieved that Mr Trump had backed away from his veto threat, saying it should help the party's candidates, David Perdue and Kelly Loeffler, in January 5 run-off elections to determine control of the Senate.
Mr Trump sought to put the best face on his reversal, saying he was signing the bill with "a strong message that makes it clear to Congress that wasteful items need to be removed".
He said the Democrat-controlled House of Representatives planned to vote on Monday to increase coronavirus relief cheques from $600 to $2,000, and said the Senate would "start the process" to approve higher payments.
Senate majority leader Mitch McConnell, a Republican, said "I thank the president for signing this relief into law", but made no mention of any plans for a Senate vote.
Democratic House Speaker Nancy Pelosi welcomed Mr Trump's signing as a "downpayment on what is needed".
"Now, the president must immediately call on congressional Republicans to end their obstruction and to join him and Democrats in support of our standalone legislation to increase direct-payment cheques to $2,000," Ms Pelosi said.
After months of wrangling, Republicans and Democrats agreed on the package last weekend, with the support of the White House.
Mr Trump stunned Republicans and Democrats when he later said he was unhappy with the bill, which provides $892 billion in coronavirus financial relief.
He spent the Christmas holiday at his Mar-a-Lago resort in Florida.
On Sunday morning, he seemed in no rush to try to resolve the standoff with Congress as he played a round of golf at the Trump International Golf Club in West Palm Beach.
He also complained that the bill gave too much money to special interests, cultural projects and foreign aid.
Mr Trump also sought to keep alive his campaign of baseless claims that the November election was rigged against him.
He said the House and Senate "agreed to focus strongly on the very substantial voter fraud" and that the Senate would launch an investigation.
Neither Mr McConnell nor Ms Pelosi made mention of such an agreement.
Democratic politicians have steadfastly rejected Mr Trump's claims, as have some Republicans.
Mr McConnell angered Mr Trump by recognising Mr Biden as president-elect.
Americans are living through a bitter holiday season amid a pandemic that has killed nearly 330,000 people in the US, with a daily death toll now well over 3,000 people, the highest since the outbreak began.
The relief package also extends a moratorium on evictions that was due to expire on December 31.
It refreshes support for small business payrolls, provides funding to help schools reopen and aid for the transport industry and vaccine distribution.