WASHINGTON - Congress cleared a stopgap funding bill Tuesday to keep the federal government open into March, a temporary truce until Republicans and President Obama rejoin the battle over the budget next year.

The bill was passed by the House in the evening just hours after speeding through the Senate. Obama was poised to sign it by midnight to avoid a government shutdown.

The measure would freeze agency budgets at current levels. That's still too high for Republicans set to take over the House, who vow to cut many programs to levels in place when Obama took office. That will be difficult to achieve, even though Republicans will control the House and possess greater strength in the Senate.

The bill would also create hardship at the Pentagon and the Homeland Security Department, which will be denied funding increases until their budgets pass next year.

The measure is needed because the Democratic-controlled Congress - in an unprecedented failure to complete its most basic job on passing a budget - has failed to enact a single one of the 12 annual spending bills that fund the day-to-day operations of every federal agency.

The House cleared the bill for Obama on a 193-165 vote after a 79-16 vote in the Senate.

Republicans promise to try next year to cut most domestic agency budgets back to pre-Obama levels. Such cuts would exceed 20 percent for some agencies.

Republicans say such cuts would produce savings of $100 billion compared with Obama's February budget request. But with the government operating at current levels for almost half the fiscal year, the actual savings that Republicans might be able to accomplish are likely to be considerably smaller. The budget year began Oct. 1.

The threat of a government shutdown is real if Democrats and resurgent Republicans can't agree.

In fact, additional stopgap spending measures may be needed next year if the battle drags on, as seems likely.

At issue is the approximately one-third of the budget passed each year by Congress to fund the 15 cabinet departments and other agencies. The rest of the budget is dominated by benefit programs such as Social Security, Medicare, and the Medicaid health-care program for the poor and disabled.

Republicans haven't been very specific about which programs they want to cut next year, though they promise to rescind unspent money from last year's economic-stimulus law, including billions of dollars for high-speed rail projects that critics say are likely to turn out to be boondoggles.

"Right now, there's a lot of posturing, a lot of slogans. I think they're going to go for a lot of quick, symbolic victories - no earmarks, trying to recapture unspent stimulus," Sen. Barbara Mikulski, a liberal Democrat from Maryland, said of pet spending projects and the economic-stimulus measure. "Then I think they'll start with women and children. And I will be combat ready."

The cuts are likely to come almost exclusively from domestic programs that have gotten boosts on the order of 10 percent a year since Obama took office.