The defense bill provides $552 billion in baseline funding and an additional $80 billion for the Afghanistan war and other overseas military operations.
The measure passed the Senate on Dec. 19 in an overwhelming 84-15 vote after senators initially failed to send it to Obama’s desk by Thanksgiving.
In past years, the annual bill passed both chambers of Congress with little controversy, but this year's legislation was delayed amid contentious fights on reforming the military's handling of sexual assaults, the fate of terror suspects at Guantanamo Bay and efforts by lawmakers to pass tougher sanctions on Iran.
“I have signed this annual defense authorization legislation because it will provide pay and bonuses for our service members, enhance counterterrorism initiatives abroad, build the security capacity of key partners, and expand efforts to prevent sexual assault and strengthen protections for victims,” said Obama in a statement.
This year's bill includes language which would prevent military commanders from overturning jury convictions in sexual assault cases. But it does not remove sexual assault cases from the military chain of command -- a proposal pushed by Sen. Kirsten Gillibrand, D-N.Y.
Obama and military leaders have said they will make tackling sexual assaults in the armed forces a priority. The bill includes measures supporters say will encourage more victims to come forward and provide them with greater protections during trial.
This year’s bill also provides Obama with expanded authority to transfer Guantanamo detainees, bringing him closer to his pledge to close the controversial prison. But it also blocked spending to improve facilities at Guantanamo or prepare other U.S. bases for receiving terror suspects.
“Since taking office, I have repeatedly called upon the Congress to work with my Administration to close the detention facility at Guantanamo Bay, Cuba,” said Obama in his statement.
“For the past several years, the Congress has enacted unwarranted and burdensome restrictions that have impeded my ability to transfer detainees from Guantanamo. Earlier this year I again called upon the Congress to lift these restrictions and, in this bill, the Congress has taken a positive step in that direction,” he added.
Obama, though, urged Congress to “eliminate all of the unwarranted limitations on foreign transfers.”
The president also criticized provisions that prevent the military from spending money on modifying other U.S. facilities to potentially house Gitmo detainees. Lawmakers backed the measure in part to prevent the administration from moving terror suspects to the U.S. for civilian trials.
“I oppose these provisions, as I have in years past, and will continue to work with the Congress to remove these restrictions. The executive branch must have the authority to determine when and where to prosecute Guantanamo detainees, based on the facts and circumstances of each case and our national security interests,” said Obama.
The bill also took center stage in the fight over tightening sanctions on Iran to force Tehran to abandon its nuclear program.
Senate Majority Leader Harry Reid, D-Nev., held off on a vote over Iran sanctions, which was opposed by the administration.
The White House urged lawmakers not to pass tougher restrictions on Tehran, warning that they could unravel a fragile nuclear deal.
Secretary of State John Kerry negotiated a deal with Iran which would provide temporary sanctions relief in exchange for Tehran suspending some elements of its nuclear program. But the deal has faced criticism on Capitol Hill and from key allies who fear it does nothing to stop Iran's nuclear quest and undermines the international sanctions regime.
Obama on Thursday also signed a bipartisan budget bill which eases some sequester cuts and keeps the government funded through September 2015, avoiding a shutdown next year.
This story was published at 4:17 p.m. and has been updated.