NEW YORK – The first Guantanamo detainee to face a civilian trial was acquitted Wednesday of most charges he helped unleash death and destruction on two U.S. embassies in Africa in 1998 — an opening salvo in al-Qaida’s campaign to kill Americans.

A federal jury convicted Ahmed Ghailani of one count of conspiracy and acquitted him of all other counts, including murder and murder conspiracy. The federal jury deliberated over seven days, with a juror writing a note to the judge saying she felt threatened by other jurors.

Prosecutors had branded Ghailani a cold-blooded terrorist. The defense portrayed him as a clueless errand boy, exploited by senior al-Qaida operatives and framed by evidence from contaminated crime scenes.

The trial in lower Manhattan had been viewed as a possible test case for the Obama administration’s aim of putting other terror detainees — including self-professed Sept. 11 mastermind Khalid Sheik Mohammed and four other terrorism suspects held at Guantanamo Bay, Cuba — on trial on U.S. soil.

Ghailani’s prosecution demonstrated some of the constitutional challenges the government would face if that happens. On the eve of his trial last month, the judge barred the government from calling a key witness because the witness had been identified while Ghailani was being held at a secret CIA camp where harsh interrogation techniques were used.