While the administration is slowly whittling down the population of those deemed a lower risk - including the transfer Friday of a prominent prisoner, Shaker Aamer, to Britain - its plan also calls for moving at least five dozen higher-level detainees to a prison on domestic soil. But statute bars that move, and the Republican-controlled Congress has shown little interest in revoking it. Obama vetoed a defense bill on Oct. 22 in part because it kept the restriction.
Obama has grown more aggressive in invoking executive power to achieve other policy goals. And his administration has been debating for years with whether and when the Constitution empowers him to bypass statutory restrictions on moving wartime detainees, according to internal documents and interviews with current and former officials for a forthcoming book on national security legal policy under Obama.
Against that backdrop, Jack Goldsmith, a Harvard Law School professor and former Justice Department lawyer in the George W. Bush administration, said Obama was heading toward a dilemma at the end of his term.
"Not closing Gitmo eight years after he pledged to do so would be a failure for his legacy, plus whatever continuing costs it has to national security in his eyes," Goldsmith said. "But the only way to close it is to use an extraordinarily aggressive interpretation of executive power to act against the will of Congress and not obviously in a way that the American people support, just as he is walking out the door."
A National Security Council spokesman, Myles Caggins, did not directly respond when asked whether the administration believes Obama has the executive power to unilaterally move the detainees out of the prison, which is in Cuba. "We will continue to transfer and prosecute detainees, and will work with Congress to remove unwarranted restrictions that hinder the closure of the detention facility at Guantanamo Bay," Caggins said.
Speaking privately, several administration officials have said they do not know Obama's intentions, and suggested that he may not have decided yet.
Obama promised to close the Guantanamo prison, which he says fuels anti-American sentiment, during the 2008 campaign. His administration coalesced around the idea of bringing to a secure facility in the United States those detainees who were deemed too dangerous to release. Under the plan, some would be held in continued wartime detention while others would be prosecuted, if possible, in a civilian court rather than before a military commission.
Then, in 2009, the administration announced that five Guantanamo detainees accused as co-conspirators in the Sept. 11, 2001, attacks would be brought to New York for a civilian trial. But political support for that plan melted away in January 2010 after a failed terrorist attack on a plane.
A proponent of military commissions, Sen. Lindsey Graham, R-S.C., pushed a defense bill amendment that would bar prosecuting those detainees in civilian court. The White House asked the Justice Department to evaluate the amendment, according to officials who spoke on condition of anonymity to discuss internal deliberations.
The task fell to David Barron, the acting head of the Justice Department's Office of Legal Counsel. As a Harvard law professor, Barron had sharply criticized the Bush administration for its claims that the president had the power to bypass anti-torture and surveillance laws.
Barron drafted a 29-page unsigned "white paper" - meaning it was tentative and not an official pronouncement - concluding that it was likely within the constitutional power of Congress to bar Obama from prosecuting detainees in civilian court, according to a five-page summary.
But Harold H. Koh, then the State Department's top lawyer and a former Yale Law School dean, who had criticized the Bush legal team but also opposed military commissions, argued that the amendment intruded on core executive powers. He added that Obama administration officials should not let their criticism of Bush for overreaching on executive power make them timid about saying when Obama had legitimate executive powers.
"Democrats get to be president, too," Koh said in one meeting.
But in Congress, then under Democratic control, there was bipartisan skepticism of the administration's Guantanamo plan. At the end of 2010, lawmakers passed a defense bill containing a restriction that was even more sweeping than Graham's amendment: It banned the transfer of any Guantanamo detainee to U.S. soil for any purpose, and imposed limits on when the military could send a detainee to another country.
The administration believed Obama needed to sign it for other reasons, and debated whether he should challenge the transfer ban as an unconstitutional intrusion on executive powers. In the end, Obama merely denounced the ban as bad policy.
On Jan. 7, 2011, the day Obama signed the bill, his Cabinet met to discuss the Guantanamo policy. Secretary of State Hillary Rodham Clinton had a proposal to chip away at the ban, according to a participant. She said federal prosecutors should strike a plea deal with one of the detainees, who would then need to be brought to the United States to complete the case. The administration could argue, she said, that the transfer ban infringed on presidential power.
"We should be strong on this," she told the Cabinet.
Others in the administration were not so sure. At a deputies-level meeting later that month, Attorney General Eric H. Holder Jr.'s deputy, James Cole, said they had been "hobbled" by the transfer ban, a participant said. And Jeh C. Johnson, the Pentagon general counsel, worried that it might now be a criminal violation to move a detainee to the mainland on a military plane.
The Justice Department did not follow Clinton's advice, and months later, Holder sent the Sept. 11 case back to the military commissions system for a trial at Guantanamo. For the next two years, the administration transferred no lower-level detainees from the prison.
It was not until 2013 that a hunger strike at the prison prompted Obama to revive his push to close it. By that time, Republicans had gained power in Congress, and Obama had become more willing to use executive authority.
He had also started raising constitutional objections to the transfer restrictions in his signing statements.
In the spring of 2014, as the administration sought to transfer lower-level detainees, another part of the restrictions began to chafe. It required the defense secretary to notify Congress 30 days ahead of time that he was satisfied that a transfer was good for national security, which essentially made him personally responsible should a former detainee engage in terrorism. Defense Secretary Chuck Hagel was reluctant to permit transfers.
On May 24, 2014, in a memo to Hagel, Susan E. Rice, Obama's national security adviser, said the president was directing him to interpret the statute in a way more favorable to closing the prison. "As is the case with all decisions to return persons detained in an armed conflict, this is not a 'zero risk' standard, and this standard reflects in part the increased harm to the national security caused by continued operation of the facility," the memo said.
Days later, when the military sent five Taliban detainees to Qatar in exchange for Sgt. Bowe Bergdahl, who had been held prisoner by the Taliban since 2009, the administration violated the provision requiring a month's notice to Congress before transferring detainees. Many Republicans said the administration had broken the law. But Pentagon officials argued that the provision did not apply, or that it was an unconstitutional intrusion on Obama's powers because of his responsibility to protect Bergdahl's life.
Last December, Congress enacted another defense bill that kept the transfer ban in place. Obama responded with his most aggressive signing statement yet, again raising constitutional objections and deeming it a "national imperative" to close the prison. But Congress kept the ban again this year, leading to Obama's recent veto.
After the veto, Koh, who is back at Yale, wrote a blog post listing legal arguments for why the administration could assert that the transfer ban is unconstitutional. He suggested that even if any move to unilaterally relocate all the detainees was controversial, Obama could still leave office "having fulfilled his most vexing campaign promise."
Obama has acknowledged growing comfortable with acting on his own to "get things done." Still, his executive actions on matters like immigration policy have relied largely upon mainstream legal authorities. By contrast, to move all Guantanamo detainees to domestic soil would align him with Bush's disputed claims that the president can override statutes.
Deborah Pearlstein, a professor at the Benjamin N. Cardozo School of Law in New York, wrote that Obama might not want to create such a precedent.
"Which does the president think is more important?" she wrote. "The strategic importance of closing Guantanamo on his watch? Or the structural, historical importance of holding the line on the expansion of presidential power in the United States?"