WASHINGTON - Congress sent President Obama a major spending bill aimed at ensuring that the military efforts in Iraq and Afghanistan won't run out of money in the coming months.

The $106 billion emergency war bill also provides money for programs ranging from pandemic-flu preparedness to "cash for clunkers" incentives to drivers who trade in their gas guzzlers for more fuel-efficient vehicles.

The Senate passed the measure, 91-5, despite complaints from several senators about the add-ons that pushed the total more than $20 billion above the funding request Obama made two months ago. The House approved the bill Wednesday, 226-202.

All six Philadelphia-area senators voted for the bill.

The White House and its Democratic allies insisted this was the last time Congress would be compelled to pass an emergency war bill, or supplemental, that is outside the normal budget process and goes directly to an increase in the national debt.

Congress has passed such bills every year since the Sept. 11, 2001, attacks. With this legislation, the amount will near $1 trillion, with about 70 percent going to the conflict in Iraq.

Obama has said that in the future all war operation expenses will be incorporated in the Pentagon budget.

The bill includes about $80 billion to finance the wars in Iraq and Afghanistan through the fiscal year that ends Sept. 30. The Pentagon has predicted that the Army could begin running out of money for personnel and operations as early as July without the infusion of more money.

It also provides $4.5 billion, $1.9 billion above what the president requested, for lightweight mine-resistant vehicles, called MRAPs, and $2.7 billion for eight C-17 and seven C-130 cargo planes that the Pentagon did not ask for.

It includes $10.4 billion in development and other aid for Iraq, Afghanistan, Pakistan, and numerous other countries; $7.7 billion for pandemic-flu preparedness; and $721 million to pay off what the United States owes for U.N. peacekeeping operations.

It does not include $80 million the White House requested to start the effort to close the detention facility at Guantanamo Bay, Cuba. The bill also prohibits detainees from being released in the United States and allows the transfer of detainees for prosecution only after Congress receives a plan detailing the risks.

Sen. Lindsey Graham (R., S.C.) and others threatened to hold up the bill because the final House-Senate compromise removed a provision barring the release of photos showing U.S. troops abusing detainees.

Graham ended his objections after the Senate approved a separate bill banning publication of the photos, and the White House assured him that Obama would classify them to prevent their release.