THE INVESTIGATION of the terrorist attack on the U.S. Consulate in Benghazi, Libya, is beginning to look disturbingly familiar. After President Obama promised “justice” for the killing of Ambassador J. Christopher Stevens and three other Americans, FBI agents were dispatched to the country. But it was three weeks before they made their first visit to the site — which had been left unsecured. Libyan authorities have arrested several people, but it is not clear whether they had any role in the assault. Meanwhile, Libyan officials appear to be resisting direct U.S. involvement in the investigation.

It’s hard not to see parallels with the diplomatic and judicial mess that followed al-Qaeda’s bombing of the USS Cole in Yemen in October 2000. An FBI team sent to that country was mostly stymied and spent much of its time feuding with the U.S. Embassy. The Yemeni government allowed a couple of the organizers of the attack to slip out of the country. Others were arrested and tried but then were released, or escaped.

In the end, two of the Cole suspects reportedly ended their lives as suicide bombers in Iraq. At least three have been killed by CIA drone strikes in Yemen, including two this year. Two were arrested outside Yemen and now are in the Guantanamo prison — including Abd al Rahim al-Nashiri, whose military commission trial has yet to get underway. One, Jamal al Badawi, is at large. None has been tried in a U.S. civilian criminal court.

This grim history has lessons for the Libya case, in which the administration already is being faulted for slowness in recognizing the role played by a group linked to al-Qaeda. As in Yemen, a weak Libyan government lacks the resources or the authority to corral Islamist militia leaders who may have been involved, much less stage a fair trial. But drone strikes should be a last resort. They could destabilize Libya’s halting attempts to set up a democratic political system and reverse the relatively high esteem for the United States among Libyans, who are grateful for American help in deposing dictator Moammar Gadhafi. If the Libyan government agreed to such action — as Yemeni authorities have — that would lower but not eliminate the political cost.

That leaves trials in U.S. courts as the best option — provided the perpetrators of the attack can be identified, apprehended and extradited. Though there is no extradition treaty between the United States and Libya, Libyan leaders could find it easier to hand over suspects than to attempt their own trials. The Obama administration, which came to office promising to close Guantanamo, would no doubt prefer that any prosecutions be handled by U.S. federal courts. But the administration should not shrink from transporting suspects to Guantanamo for detention and trial under the regime approved by Congress last year. Justice administered by that system would be far preferable to that delivered by a drone.