US lawmakers struggling to reach a critical pandemic relief and federal spending deal struck a last-minute agreement Friday to avert a midnight shutdown of the government, and extend negotiations through the weekend. Congressional leaders are frantically trying to resolve sticking points in a roughly $900 billion measure aimed at providing emergency relief for millions of Americans on the verge of losing key benefits. Because the pandemic relief plan is tied to passage of a separate $1.4 trillion federal spending package, the impasse threatened to temporarily shut down the government -- a scenario not unheard of in politically-divided Washington, but disastrous given the worsening economy and record death tolls from Covid-19. On the brink of a shutdown, the House of Representatives voted 320 to 60 late Friday to extend funding for federal agencies through Sunday to allow negotiators to finish their stimulus package. The Senate passed the measure minutes later by voice vote, and it now goes to President Donald Trump to sign by the midnight deadline. Talks on the relief package appear stuck, in part, over a Republican proposal to limit the Federal Reserve's ability to provide credit for businesses and other institutions. "We are hopeful that they will reach agreement in the near future," number two House Democrat Steny Hoyer said. "They have not reached one yet. There are still some significant issues outstanding." A package to aid struggling businesses and jobless workers is seen as critical to getting the world's largest economy back on its feet amid a resurgence of Covid-19 infections, even as new vaccines offer hope that an end to the pandemic may be in sight. Without an agreement, millions of unemployed workers will lose their special pandemic benefits before the end of the year, and a moratorium on evictions is set to lapse within days. Democrats warn that if the Fed's ability to extend lifelines is restricted, the fiscal crisis could be compounded in US states, particularly if Congress fails to pass assistance to state and local governments. President-elect Joe Biden has pushed back fiercely against the Fed proposal, which reportedly would prevent the central bank from restarting emergency lending programs that expire this year and could limit its response in future crises. The measure "could put our future financial stability at risk," Brian Deese, whom Biden has selected to chair the National Economic Council, said in a statement. "The package should not include unnecessary provisions that would hamper the Treasury Department and the Federal Reserve's ability to fight economic crises," Mr Deese added. Lawmakers have yet to even see final language on the stimulus deal or the government funding package, and some warn that both need more time. The pandemic package is expected to include aid for vaccine distribution and logistics, extra jobless benefits of $300 per week, and a new round of $600 stimulus checks -- half the amount provided in checks distributed last March. Some Democrats and a few Republicans have pushed for the stimulus checks to be doubled, to $1,200 per person. A Republican senator, Ron Johnson, opposed the proposal Friday saying it would drive up the deficit -- an argument that drew jeers from Democrats. "Now that the economy is on life support, Americans are queueing up on bread lines and filing for unemployment, and just as a Democratic president is about to take office, all of the sudden the deficit-scolds are back. It's ludicrous," said Senate Minority Leader Chuck Schumer. "The quickest way to get money into the pockets of the American people is to send some of their tax dollars right back where they came from," Mr Schumer added.