President Obama will veto this year's defense authorization bill if it includes restrictions preventing the transfer of detainees at Guantanamo Bay, White House press secretary Jay Carney said in a statement Wednesday.

"Nearly a half billion dollars per year is an unacceptable price to pay for a facility that wastes our resources, creates friction with our allies, and undermines our standing in the world," Carney said. "This needs to be the year Congress lifts the remaining restrictions and enables the closure of the detention facility at Guantanamo Bay."

Obama has long been frustrated by his inability to close the prison at Guantanamo because of restrictions inserted into defense funding bills that prohibit the transfer of prisoners to facilities on U.S. soil.

Last year, Congress agreed to relax restrictions on transferring detainees eligible to be freed to the custody of foreign countries. But the prison's continued operation remains a sore spot for Obama, who repeatedly pledged to close Guantanamo during his first presidential campaign. 

In the statement, Carney urged the House to pass an amendment, offered by Rep. Adam SmithAdam SmithCongress, authorize fresh base closures to strengthen our military GOP lawmaker drops effort to force vote to extend DACA protections Trump officials brief lawmakers on North Korea MORE (D-Wash.), that would end restrictions on detainee transfers and cut off funding after next year. 

"We urge the House to adopt the Smith Amendment and put an end to the ongoing harm to the nation’s security that results from the operation of the facility at Guantanamo Bay, Cuba," Carney said.

The White House spokesman said that federal courts "have proven themselves to be more than capable of administering justice," citing hundreds of national security cases.

But the amendment will likely face long odds in the House. A similar amendment offered as an amendment to last year's NDAA failed 174-249, with just two Republicans supporting it.