Moving with surprising speed, the House gave final approval Friday to a budget bill of more than $1 trillionthat fills in the blanks of the August debt accords and sets a new template for government spending through the 2012 elections.

The strong 296-121 bipartisan vote removes any remaining threat of a shutdown this weekend and Senate passage is now expected Saturday afternoon. As added insurance — and to allow time for the Capitol’s enrollment clerks to complete the processing of the bill — a stopgap resolution to keep agencies funded through Dec. 23 also was approved and sent on to the Senate.

Filling more than 1,200 pages, the appropriations giant is remarkable for its reach, covering the heart of President Barack Obama’s domestic priorities, the Pentagon, and foreign aid plus tens of billions more related to the war in Afghanistan.

The final details were not released until early Thursday morning and even after that, changes were still being made for the White House less than 24 hours before the Friday’s House vote. But Republicans — who had long complained of Democrats doing the same thing — shrugged off any inconsistency, and the floor debate was remarkably compressed and the outcome never in serious doubt.

“There ought to be a portion of humility for all of us to understand that the legislative process is difficult,” said House Minority Whip Steny Hoyer (D-Md.), gently reminding the GOP of its rage toward him when Democrats were in power. “I rise in strong support of this bill, and I urge my colleagues to support this piece of legislation. None of them have read it. Not one of us has read every page of this bill.”

But for history, reading may be required. Indeed, after the burst of stimulus spending at the beginning of Obama’s first year, Washington is now very much a government retrenching after a year of real cuts that have rolled back domestic appropriations to Bush-era levels when adjusted for inflation.

That translates into a roughly 10 percent cut from spending levels last January when Republicans took over the House, and under the August debt agreement, this will become a new plateau stretching into the future with annual growth pegged below the rate of inflation.

Conservatives remain unhappy that the change has not been greater, and the new $1.043 trillion cap for 2012 is truly a retreat from the much deeper cuts proposed by the House Republicans’ budget resolution last April. Then again, just a year ago, Democrats were proposing their own omnibus bill, complete with parochial earmarks and spending $73 billion higher for nondefense programs.

The change now is a real victory for the House GOP with at least two caveats.

First, to a surprising degree, the leadership has replaced spending earmarks often with special interest policy riders that are earmarks themselves in many respects. Coal, oil, paper and pulp companies, timber and Wall Street all were players behind the scene.

Second, the party is still struggling and prone to shortcuts as it copes with the caps set in August for security funding and defense.

Overseas contingency funds, ostensibly for military operations in Afghanistan and other theaters, have become a safety valve to pay for an ever larger share of core Pentagon costs. And as much as Republicans have criticized Obama’s decision to bring more American forces home, the resulting savings have helped the GOP sustain what has become a very costly military — amid spending cuts elsewhere.

The same war savings also have helped the GOP leadership steer around the problem of explaining the extra disaster aid money allowed under the August accords — outside the budget caps.

Prior to Friday, Congress already had approved about $2.4 billion in such assistance, and on a separate 351-67 vote Friday, the House approved an additional $8.1 billion for FEMA and the Army Corps of Engineers to deal with the aftermath of flooding and storms this past year.

If all this assistance were added to the $1.043 trillion spending cap, the total would exceed the $1,050 trillion cap set for 2011 — a step backward for conservatives. But in fact, however they are sliced, emergency and non-emergency appropriations are each coming down for the year when the war costs are factored in to the equation.

Colored charts prepared by the House Appropriations Committee leadership bear this out. Total appropriations— emergency and non-emergency— in 2012 are expected to be no more than $1.181 trillion, about $30 billion less than 2011 and an estimated $94 billion below fiscal 2010 when Democrats controlled Congress.

That argument seemed to work Friday. Republicans split 147-86 in favor of the omnibus spending deal; Democrats 149-35. In the case of disaster aid, the measure passed 351-67 and to appease the right, a third vote was allowed to pay for the aid by going back into the first bill and imposing an across-the-board cut of less than 2 percent, exempting defense and veterans programs.

Republicans voted in bloc for this cut but knowing full well in advance it was all for show since no one in the leadership expects it to have any chance of passing the Senate.

Covering 10 Cabinet departments and the Environmental Protection Agency, the core package is really nine-bills-in-one and includes $126.5 billion in war-related contingency funds on top of about $917 billion in more conventional appropriations.

Among the hundreds of accounts are multiple tradeoffs. The draft bill proposes a $233 million cut from the Environmental Protection Agency — almost perfectly matching a $237 million increase for the Indian Health Service. In the case of the Homeland Security Department, increases are provided for frontline agencies like the Secret Service and Border Patrol, but that translates into a cut of $1 billion, or 30 percent, from grant funds for state and local first responders and their equipment.

Science continues to be a modest winner, with added funds in the Energy Department as well as the National Institutes of Health, which is promised $30.7 billion, an increase of almost $300 million over current funding. And behind the spending freeze for education are multiple, often difficult choices for Democrats.

Pell Grants for low-income college students survive, for example, at the maximum award level of $5,500, but also substantial reforms are written into the bill to come up with about $1.36 billion in savings. Obama’s Race to the Top public school reform program is cut to $550 million, a 21 percent reduction from current funding and much less than his request. But new flexibility is allowed for carrying out the initiative so that large metropolitan school districts can now compete on their own — without being subject to their respective governors.

In total, program funding for labor, health and education would fall about $1.4 billion from 2011 and much more from the Democratic omnibus a year ago. But the Pentagon still ekes out a $5.1 billion increase, bringing its budget to $518.1 billion for 2012. And both here and in the case of the State Department and foreign aid, the bill makes liberal use of contingency funds to pad security-related spending.

As much as $11.2 billion from such war-related funds would now fall under the foreign aid program — an increase over what Obama requested. Counterinsurgency aid for Pakistan would be cut to $850 million and new conditions attached, reflecting the increased tensions between Washington and Islamabad. At the same time, access to the contingency funds clearly helped negotiators to protect other priorities, including $5.54 billion to fight AIDS overseas and a total Global Health program of $8.16 billion, up from current spending.