The $106 billion emergency war bill also branches off to provide money for programs ranging from pandemic flu preparedness to a "cash for clunkers" initiative to encourage drivers to switch to more fuel-efficient vehicles.
The Senate passed the measure on a one-sided 91-5 vote 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 on Wednesday by a much closer 226-202 vote.
The White House and its Democratic allies insisted that this will be the last time Congress will be compelled to pass an emergency war bill, or supplemental, that is outside the normal budget process and thus goes directly to an increase in the national debt.
Congress has passed such bills every year since the Sept. 11, 2001, terrorist attacks, and with enactment of 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 Defense Department budget.
The bill includes about $80 billion to finance the wars in Iraq and Afghanistan through this 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.
On the nonmilitary front, there's $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 U.S. owes for U.N. peacekeeping operations.
The bill almost foundered in the House over Republican objections to the inclusion of $5 billion to set up a U.S. line of credit for an International Monetary Fund loan program for poor countries hit by the world recession.
In the Senate, Sen. Lindsey Graham, R-S.C., and others threatened to hold up the bill because the final House-Senate compromise removed a provision prohibiting 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 the photos to prevent their release.
The final obstacle was removed earlier Thursday when the Senate voted 60-36 to waive a procedural objection by Sen. Judd Gregg, R-N.H., against the $1 billion for the "cash for clunkers" program. Sixty votes were needed to prevent Gregg from succeeding and sending the bill back to the House for another vote.
"Why should our grandchildren have to pay for cars we're going to buy today from people?" Gregg asked.
Sen. John McCain, R-Ariz., also said the bill "contains billions of dollars in unrequested spending that is largely unjustified and is certainly non-emergency." In addition to the auto program providing government rebates for those trading in old cars for more fuel-efficient models, he mentioned $13 million to provide air service to rural communities and $35 million for the FBI to fight mortgage fraud.
But Senate Majority Leader Harry Reid, D-Nev., urged support for the package, saying it was not just a matter of numbers. "This bill also contains our commitment to strengthening our military, rebuilding our relationships with key allies around the world and reducing key security threats," he said.