The Senate plans to vote Monday, sending the package to the president.
"The funding package is an essential part of the Iraq exit strategy," said Republican Rep. Roy Blunt, the House's No. 3 Republican. "The sooner we bring prosperity back to the region, the sooner we bring our sons and daughters home safe."
The 298-121 House vote early Friday was a victory for Mr. Bush, but came with pointed questions from Democrats about the wisdom of an Iraq policy that is costing American lives and dollars with limited help from the international community.
"Because President Bush lacked an adequate plan for postwar Iraq, American soldiers are taking virtually all of the risks and American taxpayers are paying virtually all of the bills," said House Minority Leader Nancy Pelosi, a Democrat, who voted against the measure.
The package, for expenses during the current budget year, includes nearly $65 billion for U.S. military operations in Iraq and Afghanistan and $18.6 billion to rebuild Iraq and improve the country's security and law enforcement.
The package closely mirrored the amounts sought by the president, and met his demand that all the money for rebuilding Iraq be in the form of grants rather than loans.
House-Senate negotiators, in working out the final details of the package, eliminated a Senate provision that would have required that half the money for Iraqi reconstruction and security forces be given as loans instead of grants.
The House also supported the concept of loans in a nonbinding vote, with many lawmakers arguing that Iraq, possessing the world's second largest oil reserves, would some day be able to repay any debts.
The administration said the president would veto the bill if it contained loans, saying loans would be a deterrent to efforts to persuade other nations to forgive Iraq's debts accumulated during Saddam Hussein's regime.
That convinced some who originally pressed for loans, including Republican Rep. Zack Wamp. "We were all hit with sticker shock: $87 billion is a huge number," he said. "I'm going to grit my teeth and vote yes tonight and say that we cannot afford to fail in Iraq."
Eighty-two Democrats voted for the measure, while five Republicans opposed it.
The Iraq reconstruction money includes $3.2 billion for security and law enforcement, $5.6 billion for the electric sector, $1.9 billion for rebuilding the oil industry and $4.3 billion for water and sanitation. Afghanistan would receive $1.2 billion for rebuilding efforts.
Afghanistan welcomed the House's approval of the aid package but said more will be needed over the long term to rebuild after decades of war.
"We are grateful to the United States for taking the lead in mobilizing reconstruction assistance for Afghanistan," Jawid Luddin, Afghan President Hamid Karzai's spokesman, told The Associated Press. He said the one year of assistance "will go a long way toward achieving the reconstruction goals of Afghanistan."
The legislation also designates $245 million for peacekeeping activities in Liberia, $44 million for a secure embassy in Kabul, Afghanistan's capital, and $50 million to reward those providing information leading to the capture of Saddam Hussein and Osama bin Laden.
Negotiators also added $500 million for Federal Emergency Management Agency assistance to cover the wildfires in California and elsewhere.
Prior to the war, the White House refused to estimate its cost. Then-White House budget director Mitch Daniels guessed $50 to $60 billion in a newspaper interview last fall. Former White House economic adviser Larry Lindsey put the price tag between $100 billion and $200 billion. Deputy Defense Secretary Paul Wolfowitz told Congress in March: "We are dealing with a country that can really finance its own reconstruction, and relatively soon."
In April, Congress passed a supplemental request approving $79 billion for Iraq and security operations elsewhere.