WASHINGTON — President Barack Obama took dramatic steps Thursday to reverse Bush administration policies on terrorist detention and interrogation, ordering the closure of the U.S. detention camp at Guantanamo Bay, Cuba, and banning the use of controversial CIA interrogation techniques. But he left open the question of how his administration will deal with any detainees it concludes are too dangerous to be released.

Flanked by 16 retired generals and admirals, Obama signed executive orders fulfilling his pledge to end what he has called torture and to abolish a facility that became a lightning rod for international criticism, drawing praise from human-rights groups as well as politicians and statesmen from across the globe.

The executive orders left maneuvering room on some Bush policies that have long drawn disapproval, however. Senior administration officials indicated that the military commissions established by the previous administration to try prisoners at Guantanamo — whose operations were suspended by Obama on Wednesday — might be preserved in some form for those terrorist detainees determined to be “unreleasable” and “untriable.”

The orders did not prohibit renditions, in which the CIA has secretly transferred prisoners captured in one country to another without trial. Although they mandated that the CIA adhere to interrogation guidelines used by the military, officials said that a separate “protocol” may still be established to govern intelligence agency interrogation practices.

Those issues and others are to be reviewed by a Cabinet-level task force that will study how to deal with the most vexing legacies of the Bush administration’s detention program, Obama said. The task force, coordinated by the attorney general, will review the cases of all 245 remaining Guantanamo prisoners and determine which can be released and which can be tried in U.S. civilian or military courts.

Some prisoners, however, may be determined to be dangerous, but not prosecutable because the evidence against them is scant or tainted by allegations of abuse or torture. The fate of that group is to be decided by the task force.

The panel will also make recommendations on how future high-level terrorism suspects should be handled.

Secret prisons

Obama insisted that the overarching message of his first national-security orders was unequivocal: “The United States will not torture.”

“The orders that I signed today should send an unmistakable signal that our actions in defense of liberty will be as just as our cause,” he said at a news conference, “and we, the people, will uphold our fundamental values as vigilantly as we protect our security.”

The four executive orders signed by Obama in the White House’s Oval Office had been largely telegraphed in advance and were in keeping with major campaign promises. The one closing Guantanamo Bay called for moving out all prisoners “no later than one year from now,” after the case-by-case review.

The reviews are to be carried out on a rolling basis, with action taken on individuals as soon as they are reviewed. Officials declined to speculate on the numbers of prisoners who might end up in any of the three categories of “releasable,” “triable” or “non-triable.” Options for dealing with those determined to be in the third category, officials said, might include special national security courts or even revised military commissions.

“There will be a process” that will comply with U.S. and international laws while “not compromising national security,” said a senior administration official who briefed reporters while insisting on anonymity.

Changes for CIA

Obama’s executive order on CIA interrogations ordered a permanent halt to the agency’s use of secret prisons as well as coercive measures such as waterboarding. The order essentially puts the CIA out of the incarceration business and imposes strict limits on how the agency handles suspected terrorists who may be held temporarily for questioning.

The CIA — together with all other government agencies — would have to rely on the same l6 interrogation techniques approved for military interrogators in a guidebook known as the Army Field Manual.

The Bush administration and the CIA have denied that they knowingly caused any detainees to be tortured, either while in U.S. custody or in foreign prisons.