The bill is $1.7 billion more than Obama requested.
House Republicans and Democrats debated the measure against the backdrop of high-stakes talks to avert the so-called fiscal cliff of automatic tax hikes and spending cuts and the loud cry for a sweeping deal to slash the deficit.
Democrats argued that the bill runs counter to demands for fiscal discipline.
"This bill is more money than the Pentagon wants," said Rep. Jim McGovern, D-Mass. "We're just throwing money at them."
Specifically, the bill spares a version of the Global Hawk unmanned aircraft, includes upgrades for tanks and money for armored vehicles.
In a speech this week, Defense Secretary Leon Panetta criticized the pressure on the Pentagon to keep weapons that it doesn't want. "Aircraft, ships, tanks, bases, even those that have outlived their usefulness, have a natural political constituency. Readiness does not," Panetta said.
"What's more, readiness is too often sacrificed in favor of a larger and less effective force. I am determined to avoid that outcome," he said.
Panetta said members of the House and Senate "diverted about $74 billion of what we asked for in savings in our proposed budget to the Congress, and they diverted them to other areas that, frankly, we don't need."
House Armed Services Committee Chairman Howard "Buck" McKeon, R-Calif., insisted that the bill "safeguards military readiness in times of declining budgets."
The bill responds to the new threats and upheaval around the globe while still providing billions for the decade-plus war in Afghanistan. The measure would tighten sanctions on Iran, increase security at diplomatic missions worldwide after the deadly Sept. 11 raid in Libya and presses the military on possible options to end the bloodshed in Syria.
The final measure, a product of negotiations between the House and Senate, addresses several concerns raised by the Obama administration. It eliminates restrictions on alternative fuels that the White House had complained about and jettisons limits on the administration's ability to implement a nuclear weapons reduction treaty.
The bill does limit the president's authority to transfer terror suspects from the military prison at Guantanamo Bay, Cuba, for one year a provision similar to current law. That had drawn complaints from the White House.
Election-year politics and changes in society shaped the final measure. Negotiators kept a Senate-passed provision sponsored by Sen. Jeanne Shaheen, D-N.H., that expands health insurance coverage for military women and their dependents who decide to have abortions in cases of rape and incest.
Previously, health coverage applied only to abortions in cases where the life of the mother was endangered.
Democrats argued throughout the election year that Republicans were waging a "war on women" over contraception and abortion, a charge the GOP denied. Democrats and President Barack Obama held a clear edge with female voters, which led to soul-searching within the GOP.
Negotiators jettisoned a House provision that would have banned gay marriage on military installations, weeks after the chapel at the U.S. Military Academy at West Point held its first same-sex marriage. A senior Army chaplain conducted the ceremony. The bill does include a conscience clause for chaplains.
The measure includes a 1.7 percent pay raise for military personnel and provides money for new ships, aircraft and other weapons.
The sanctions would hit Iran's energy, shipping and shipbuilding sectors as well as Iran's ports, blacklisting them as "entities of proliferation concern." It would impose penalties on anyone supplying precious metals to Iran and sanctions on Iranian broadcasting.
The bill eliminated a House provision barring the military from buying alternative fuels if the cost exceeds traditional fossil fuels, a measure that had drawn a veto threat. Instead, negotiators said the Pentagon could move ahead on the project as long as the Energy and Agriculture departments make their financial contributions to the work.
The bill also watered down a House effort to require construction of an East Coast missile defense site, instead pressing the Pentagon to study three possible locations.
Months after the attack on the U.S. Consulate in Benghazi, Libya, that killed Ambassador Chris Stevens and three other Americans, the bill would provide an additional 1,000 Marines for embassy security.
Reacting to relentless violence in Syria, the bill would require the Pentagon to report to Congress on possible military options.
The bill would authorize nearly $480 million for the U.S.-Israeli missile defense, including $211 million for Iron Dome, the system designed to intercept short-range rockets and mortars fired by Palestinian militants from Gaza at southern Israel.
One of the thorniest issues in negotiations was the handling of terrorist suspects. Lawmakers finally agreed on language that says "nothing in the authorization for the Use of Military Force or (the current defense bill) shall be construed to deny the availability of the writ of habeas corpus or to deny any constitutional rights" to an individual in the United States who would be entitled to such rights.
The agreement retained a Senate provision that stops the Pentagon from sending additional spies overseas until Congress has answers about the cost and how the spies would be used.
What's in the bill?
The bill covers the cost of ships, aircraft, weapons and military personnel.
$528 billion • Defense Department's base budget
$17 billion • Energy Department's defense and nuclear programs
$88.5 billion • for the war in Afghanistan