WASHINGTON - House Democrats muscled through legislation Wednesday night that would freeze the budgets of most cabinet departments and fund the wars in Afghanistan and Iraq for another year.

The bill would cap the agencies' annual operating budgets at the $1.2 trillion approved for the recently finished budget year - a $46 billion cut of more than 3 percent from President Obama's request. It includes $159 billion to cover the wars.

The 423-page measure, opposed by Republicans, conservative Democrats, and some antiwar lawmakers, narrowly passed by a 212-206 vote. The budget-freeze bill wraps a dozen unfinished spending bills into a single measure.

The bill, combined with a measure to extend the Bush-era tax cuts, extend jobless aid, and cut the payroll tax, represents the bulk of Congress' unfinished work as the lame-duck session nears its close.

The measure passed the Senate by 73-25 last week but got caught in a snag because it contained revenue provisions that, under the Constitution, must originate in the House.

There are many exceptions to the freeze. Health-care programs for veterans and the military would get a boost, and the measure adds $5.7 billion to the Pell Grant program for low-income college students to maintain the maximum grant at $5,550. People serving in the military would get a 1.4 percent pay raise, but civilian federal workers would have their salaries frozen.

Senate Democrats are working on a different approach that would provide slightly more money and would include thousands of pet projects sought by lawmakers. It is unclear whether that measure can get enough support from GOP old-timers to survive a filibuster by party conservatives. The House bill is free of such "earmarks."

The measure passed over Republican protests that it still spends too much money and that it caps an unprecedented collapse of the federal budget process in which not a single one of the 12 annual spending bills has yet passed Congress. Ten of 12 House bills have not even been made public.

House Republicans wanted a short-term measure to punt unfinished budget business into next year, when they will assume the majority and have more leverage to seek concessions from Obama on spending.

House Appropriations Committee Chairman David R. Obey (D., Wis.) said the legislation would "salvage some investments which, over the long haul, just might create more jobs than a tax break for millionaires." Obey was able to find money for some Democratic priorities because other accounts were cut, especially military base closings.

In a setback for Obama's plans to prosecute detainees on U.S. soil, the bill would prevent accused Sept. 11 mastermind Khalid Sheikh Mohammed and other detainees held at Guantanamo Bay from being transferred to this country for trials in criminal courts.

The budget for high-speed rail would take a cut; housing aid for the poor would rise.

How They Voted

Representatives from the Philadelphia area who voted for the bill were Robert E. Andrews (D., N.J.), Robert A. Brady (D., Pa.), Chaka Fattah (D., Pa.), Tim Holden (D., Pa.), Patrick Murphy (D., Pa.), Allyson Y. Schwartz (D., Pa.), and Joe Sestak (D., Pa.).

Voting against the bill were John Adler (D., N.J.), Michael N. Castle (R., Del.), Charles W. Dent (R., Pa.), Jim Gerlach (R., Pa.), Frank A. LoBiondo (R., N.J.), Joseph R. Pitts (R., Pa.), and Christopher H. Smith (R., N.J.).