WASHINGTON (AP) -- A massive defense bill is on the brink of final passage after the Obama administration and Congress resolved a fierce struggle over the president's ability to prosecute terrorist suspects in the civilian justice system.
The House voted 283-136 for the $662 billion measure Wednesday night, a rare bipartisan vote the reflected the strong support for annual legislation that authorizes money for the men and women of the military as well as weapons systems and the millions of jobs they generate in lawmakers' districts.
The Senate was expected to clear the bill Thursday and send it to President Barack Obama.
The House vote came just hours after the administration abandoned a veto threat over provisions dealing with the handling of terrorism suspects.
Applying pressure on House and Senate negotiators working on the bill last week, Obama and senior members of his national security team, including Defense Secretary Leon Panetta and Secretary of State Hillary Rodham Clinton, had sought modifications in the detainee provisions.
Negotiators announced the changes late Monday, clearing the way for White House acceptance.
In a statement, press secretary Jay Carney said the new bill "does not challenge the president's ability to collect intelligence, incapacitate dangerous terrorists and protect the American people."
Specifically, the bill would require that the military take custody of a suspect deemed to be a member of al-Qaida or its affiliates who is involved in plotting or committing attacks on the United States. There is an exemption for U.S. citizens.
House and Senate negotiators added language that says nothing in the bill will affect "existing criminal enforcement and national security authorities of the FBI or any other domestic law enforcement agency" with regard to a captured suspect "regardless of whether such ... person is held in military custody."
The bill also says the president can waive the provision based on national security.
"While we remain concerned about the uncertainty that this law will create for our counterterrorism professionals, the most recent changes give the president additional discretion in determining how the law will be implemented, consistent with our values and the rule of law, which are at the heart of our country's strength," Carney said.
Uncertainty was a major concern of FBI Director Robert Mueller, who expressed serious reservations about the detainee provisions.
Testifying before the Senate Judiciary Committee, Mueller said a coordinated effort by the military, intelligence agencies and law enforcement has weakened al-Qaida and captured or killed many of its leaders, including Osama bin Laden and Anwar al-Awlaki, the U.S.-born radical Islamic cleric. He suggested that the divisive provision in the bipartisan defense bill would deny that flexibility and prove impractical.
"The statute lacks clarity with regard to what happens at the time of arrest. It lacks clarity with regard to what happens if we had a case in Lackawanna, N.Y., and an arrest has to be made there and there's no military within several hundred miles," Mueller said. "What happens if we have ... a case that we're investigating on three individuals, two of whom are American citizens and would not go to military custody and the third is not an American citizen and could go to military custody?"
Unnerving many conservative Republicans and liberal Democrats, the legislation also would deny suspected terrorists, even U.S. citizens seized within the nation's borders, the right to trial and subject them to indefinite detention. House Republican leaders had to tamp down a small revolt among some rank-and-file who sought to delay a vote on the bill.
Some of the Republicans were concerned that the "president would use the military to round up American citizens," said Rep. Allen West, R-Fla., a member of the Armed Services panel.
The escalating fight over whether to treat suspects as prisoners of war or criminals has divided Democrats and Republicans, the Pentagon and Congress.
The administration insists that the military, law enforcement and intelligence officials need flexibility in the campaign against terrorism. Obama points to his administration's successes in killing bin Laden and al-Awlaki. Republicans counter that their efforts are necessary to respond to an evolving, post-Sept. 11 threat and that Obama has failed to produce a consistent policy on handling terror suspects.
Highlighting a period of austerity and a winding down of decade-old conflicts, the bill is $27 billion less than Obama requested and $43 billion less than Congress gave the Pentagon. The bill also authorizes money for the wars in Iraq and Afghanistan and national security programs in the Energy Department.
Frustrated with delays and cost overruns with the troubled F-35 Joint Strike Fighter aircraft program, lawmakers planned to require the contractor, Lockheed Martin, to cover the expense of any extra costs on the next batch and future purchases of the aircraft. The Pentagon envisions buying 2,443 planes for the Air Force, Marine Corps and Navy, but the price could make it the most expensive program in military history -- $1 trillion.
The legislation freezes $700 million for Pakistan until the defense secretary provides Congress a report on how Islamabad is countering the threat of improvised explosive devices.
It would impose tough new penalties on Iran, targeting foreign financial institutions that do business with the country's central bank. The president could waive those penalties if he notifies Congress that it's in the interest of national security.
Associated Press writers Pete Yost and Andrew Taylor contributed to this report.