That version would also say that Guantánamo could be used to hold accused members of Al Qaeda or the Islamic State, the official said. Transferring Islamic State suspects there would defy warnings by national security and legal officials about creating legal risks for the broader military campaign underway in Iraq and Syria.
The second version, the official said, would add language that says the secretary of defense, Jim Mattis, may bring newly captured terrorism suspects to the prison. That version explicitly grants an authority that is merely implicit or ambiguous in the first version.
And the third version, the official said, would direct Mr. Mattis to establish criteria about which new detainees should be brought to the prison. It would also make clear that new arrivals would be given periodic reviews by a six-agency parole—like board that recommends whether to keep holding or to transfer detainees.
Another official familiar with internal deliberations said Mr. Trump is unlikely to sign any detention order for several weeks because the changes may be wrapped into a broader counterterrorism policy review that is underway.
A spokesman for the National Security Council declined to comment.
President George W. Bush opened the military prison in Cuba in January 2002 to hold and interrogate detainees from the Afghanistan War. It sent about 780 men there for indefinite detention without trial. A few were eventually charged by the military commission system that Mr. Bush established there, which has achieved several convictions through plea deals but has struggled to hold contested trials.
After Guantánamo’s image became toxic worldwide, and the Supreme Court ruled that the judicial branch could hear habeas corpus lawsuits by the detainees, Mr. Bush began trying to close the prison. In 2009, Mr. Obama inherited about 242 detainees and continued that policy, directing the government to close the prison within a year.
However, Congress blocked Mr. Obama’s plan to bring several dozen detainees — who were deemed untriable but unable to be released — to a domestic prison in the United States. Still, arguing that Guantánamo was too expensive and fueled anti-Americanism, Mr. Obama chipped away at its population; 41 remained when he left office.
Five detainees are on a list recommended for transfer to stable countries — including one each from Algeria and Morocco, which have already taken back many others. Mr. Trump, who called for ending all transfers because of the risk of recidivism, has given no sign that he will permit their repatriations.
Still, the Trump administration may soon repatriate a Saudi, Ahmed Muhammed Haza al-Darbi, under a February 2014 plea deal with military commissions prosecutors. He promised to cooperate as a witness in return for being repatriated after three and a half years to serve the remainder of his nine-to-15-year sentence in Saudi Arabia. Mr. Darbi testified this month in videotaped depositions for use in future trials.
Since its first week in office, the administration has internally circulated various drafts of a detention order. Those efforts slowed, however, after Congress and military and intelligence officials pushed back against ideas in early drafts, like reopening the C.I.A.’s overseas “black site” prisons where the Bush administration tortured terrorism suspects.
The White House dropped that and several other ideas, but as the drafts were watered down, momentum to finish the job faltered. Meanwhile, the administration has brought no new detainees to Guantánamo, despite Mr. Trump’s campaign vow to fill the prison back up.
European and Middle Eastern allies will not transfer detainees to the United States without a promise they will not be sent to Guantánamo. Last month, Spain transferred custody of a terrorism suspect, Ali Charaf Damache, whom the Trump administration brought to federal court in Philadelphia for a civilian trial.
The administration has also sought custody of a Qaeda suspect known as Abu Khaybar, who is being held in Yemen by an unidentified Middle Eastern ally. But that ally, while willing to transfer the man, also will not do so if his destination would be Guantánamo, current and former law enforcement officials say.