The first former Guantánamo detainee to be tried in a civilian court was acquitted on Wednesday of all but one of more than 280 charges of conspiracy and murder in the 1998 terrorist bombings of the United States Embassies in Nairobi, Kenya, and Dar es Salaam, Tanzania.

The case has been seen as a test of President Obama’s goal of trying detainees in federal court whenever feasible, and the result seems certain to fuel debate over whether civilian courts are appropriate for trying terrorists.

The defendant, Ahmed Khalfan Ghailani, 36, was convicted of one count of conspiracy to destroy government buildings and property. He was acquitted of four counts of conspiracy, including conspiring to kill Americans and to use weapons of mass destruction.

Because of the unusual circumstances of Mr. Ghailani’s case  after he was captured in Pakistan in 2004, he was held for nearly five years in a so-called black site run by the Central Intelligence Agency and at Guantánamo Bay, Cuba  the prosecution faced significant legal hurdles even getting his case to trial.