Story highlights The measure now goes to President Barack Obama's desk

The White House lifted a veto threat after changes in detainee language

The issue involved presidential authority over military or civilian custody for terrorism suspects

The $662 billion measure includes tough sanctions against Iran over nuclear program

The Senate gave approval Thursday to a giant $662 billion defense authorization bill, sending it to President Barack Obama for his signature.

On Wednesday, the White House lifted a veto threat against the bill after legislators made changes in language involving detainees.

In particular, the legislators added language to make clear that nothing in the bill requiring military custody of al Qaeda suspects would interfere with the ability of civilian law enforcement to carry out terrorism investigations and interrogations in the United States.

A statement by White House Press Secretary Jay Carney said the changes meant that Obama's advisers would not recommend a veto.

Later Wednesday, the House approved the bill, and Thursday's 86-13 vote in the Senate completed the necessary congressional action.

At issue was the president's authority in deciding whether people detained in terrorism investigations would be held in military or civilian custody.

Sen. John McCain of Arizona, the top Republican on the Senate Armed Services Committee, said the legislation includes a "national security waiver" that allows the president to transfer a suspect from military to civilian custody if he chooses.

The legislators also agreed on tough sanctions language for the Iranian Central Bank, aimed at punishing Iran for its nuclear program. The White House had expressed opposition to that provision as well, but it received broad support in Congress.

The measure "will put real additional pressure on the Iranians so they are going to pay a bigger and bigger price, if they continue to move towards nuclear weapons," said Sen. Carl Levin, D-Michigan, the chairman of the Senate Armed Services Committee.

In addition, legislators agreed to tough new restrictions on Pakistan to ensure that country is not participating in the manufacture and transport of improvised explosive devices, or IEDs, the hidden bombs that have caused havoc for coalition forces in Afghanistan.

"We've had some shaky relations with Pakistan lately. We need them, and they need us," said Rep. Buck McKeon, R-California, the chairman of the House Armed Services Committee. "We have frozen some of the money that we will be sending to Pakistan until they offer more assurances, more help in this area of ... fertilizer and the things that go into making IEDs."