US lawmakers moved closer to a deal on a $900bn economic relief package ahead of a Sunday night funding deadline, after striking a late-night compromise over Republican demands to curb the Federal Reserve’s crisis lending powers.

A deal would be the second-largest economic relief package in US history, trailing only the $2.2tn Cares Act, which was passed in March at the onset of the coronavirus pandemic in the US.

Members of Congress had originally set themselves a limit of the end of the working week to strike a deal to continue funding the federal government and provide much-needed stimulus to a US economy battered by the Covid-19 pandemic.

But a stop-gap measure extended the deadline to Sunday night after talks stalled over proposals from Pat Toomey, a Republican senator from Pennsylvania. Mr Toomey sought to insert language into the legislation that would prevent the Fed from reviving emergency credit facilities due to expire at the end of the year.

Democrats initially rejected the efforts, accusing Republicans of trying to “tie the hands” of a Joe Biden White House at the last minute, and leading to several days of intense sparring between the two sides.

But an agreement on the Fed issue was reached just before midnight on Saturday, which Democrats said brought a final agreement on economic stimulus “significantly closer”. Lawmakers said they were hopeful a final text could be agreed and voted on later on Sunday, but cautioned there was more work to be done.

Heading into the weekend, lawmakers were still at odds on issues ranging from direct payments to cash-strapped Americans to an increase in funding for the Supplemental Nutrition Assistance Program, often called food stamps.

Last week, congressional leaders said they were “closing in” on a deal that would include means-tested cheques of about $600 for US adults. But many lawmakers on both sides of the political aisle said that was not enough, with Bernie Sanders, the independent senator from Vermont who caucuses with the Democrats, and Josh Hawley, the Republican from Missouri, calling for $1,200 cheques for adults and $500 for children, in line with the payments made from the Cares Act.

Mr Toomey told reporters on Sunday that he was “very pleased” with the agreement on the central bank’s coronavirus lending, which he said would shut down the Fed lending facilities at the end of the year and repurpose any unused funds. He said any future emergency lending facilities would need to be approved by Congress.

“We did end up narrowing the language versus what we had originally put on the table, but it achieves the purpose that we needed,” he added.

He also rejected Democrats’ suggestions that his efforts were politically motivated, saying he first raised concerns about the Fed lending facilities back in March, long before Mr Biden won the presidential election on November 3.

Mr Toomey’s initial proposals sparked outrage among Democrats and prompted a rare rebuke from Ben Bernanke, the former Fed chair, earlier on Saturday.

“I strongly support the passage of new aid for families and businesses suffering from the effects of the pandemic,” Mr Bernanke wrote in a statement.

“However, it is also vital that the Federal Reserve’s ability to respond promptly to damaging disruptions in credit markets not be circumscribed.

“The relief act should ensure, at least, that the Federal Reserve’s emergency lending authorities, as they stood before the passage of the Cares Act, remain fully intact and available to respond to future crises,” Mr Bernanke added.

Mr Biden will be inaugurated as the 46th US president on January 20, and while Democrats will control the House of Representatives, it remains unclear whether Republicans will hold the Senate. Control of the upper chamber of Congress will be decided by two Senate run-offs to be held in Georgia on January 5.

Mr Biden has repeatedly called for more economic stimulus as the number of Covid-19 cases surges in many parts of America, and official figures point to further weakness in the US labour market.