The Obama administration has correctly decided to hold al-Qaida’s computer expert, captured in Libya, as an illegal enemy combatant so he can be questioned at length about his knowledge of terrorist operations. But there is a downside to the decision.

During his successful 2008 White House bid, then-Sen. Barack Obama decried the George W. Bush administration’s use of “illegal enemy combatant” status for terror suspects.

Yet that status is recognized by the Geneva conventions for those who are not entitled to the full range of rights and protections established by international law for prisoners of war.

And under current U.S. law such prisoners are not entitled to the full range of American legal rights if held outside the geographical limits of the United States.

As a candidate, Mr. Obama denounced the prison created for such prisoners at Guantanamo, the use of other foreign detention centers and the legal system of military commissions used to try them for war crimes. He vowed to close Guantanamo — a promise he has been unable to keep because there are no present alternatives for incarcerating or repatriating its current occupants.

Now President Obama, rather than sending Abu Anas al-Liby to Guantanomo where he belongs, has decided to hold him on a Navy ship so he can be interrogated there.

The federal public defender’s office in New York has written to a federal judge seeking appointment to represent al-Liby, who has been subject to a federal indictment since 2002, asserting that there is “no lawful basis” for deferring his prompt arraignment in court and appointment of legal counsel.

The evidence is clear that we are still at war with al-Qaida, which certainly considers itself at war with the U.S. Accordingly, gathering intelligence about our terrorist enemies must take a high priority — at least as high as killing them with drones. And the courts have affirmed the government’s right to deny the full range of U.S. legal rights to enemy combatants.

So the Obama administration is within the law in holding al-Liby for questioning before turning him over to any court, civilian or military.

Where it is making a dangerous choice is in using a warship as a prison ship, a decision the president’s critics on the left are already deriding as “Guantanamo at sea.”

The Guantanamo prison was built to hold enemy combatants. This administration apparently now acknowledges that legitimate purpose.

But Sen. Lindsey Graham, R-S.C., warns that the failure to send al-Liby to Guantanamo is a “huge mistake,” because using a ship as a temporary prison shortens the time available for questioning him.

It also increases legal pressure on the president to bring him quickly before a federal judge, erasing his “enemy combatant” status. That would abruptly end the prisoner’s usefulness as a source of crucial information.

And that could have tragic consequences as the war on terror — and the terrorists’ war on America — persists.