WASHINGTON — The US Congress approved a temporary spending bill that will fund the federal government for another 10 weeks through March 4 in order to avoid a government shutdown.

The Senate adopted the stopgap measure 79-16 followed by the House of Representatives 193 to 165 before the continuing resolution -- a law funding the federal government -- was set to expire Tuesday at midnight.

President Barack Obama must now sign the bill into law. It freezes the budgets of government agencies at current levels.

The move came after Democrats -- who will lose their House majority in January and see their numbers shrink in the Senate -- failed to secure enough Republican support to pass a massive 1.1-trillion-dollar so-called omnibus extension to fund the government through October 2011.

Republicans have vowed to cut spending when they are sworn in to the new Congress with increased leverage over Obama and his fellow Democrats.

Had lawmakers failed to pass a new spending measure, the government would only be able to spend funds on essential operations, with no authorization to spend money on other initiatives.

Congress has often passed funding measures just hours or days before the required deadline.

In 1995, Republicans alarmed by the already huge US debt forced a days-long government shutdown during which non-essential government workers were placed on furlough and non-essential services were suspended.

The shutdown was triggered by a standoff between president Bill Clinton, who refused to make certain budget cuts, and the Republican-controlled Congress, which threatened to refuse to raise the US debt limit.

Starting next month, Obama will have to ask Congress to raise the debt ceiling once more.

But he will be challenged by fiscal conservatives, who will see their ranks swell and who find the current debt ceiling of 14.3 billion dollars high enough.