A Bosnian appeals court on Friday ordered the retrial of an Islamist extremist who opened fire on the US embassy in Sarajevo in 2011, citing failures to respect his legal rights.
Mevlid Jasarevic, 24, was given an 18-year sentence in December 2012, the heaviest ever handed down for terrorism offences by a Bosnian court.
But the appeals court said in a statement the verdict was "annulled" and announced a new trial due to "serious procedural breaches" and "violation of [the] defendant's rights", without giving specific details.
Jasarevic fired 105 bullets at the US embassy in October 2011 with an automatic weapon for almost an hour before being shot by police and arrested. One police officer was injured in the attack.
He will remain in detention until the appeals procedure is finished or for one year, whichever was the shorter period, the court said.
Jasarevic's lawyer Senad Dupovac told reporters that he was not allowed to present all his evidence during the first trial.
In a video recorded before the attack and broadcast by the prosecution last year, Jasarevic said his act was a response to the American "war" against Islam.
"I attack the Americans who have launched a war against Islam and Muslims throughout the world," he said in the video.
Jasarevic, a Muslim Serbian citizen, joined a group of Islamists in the northeastern village of Gornja Maoca, Bosnia.
The hamlet is considered the headquarters of the Bosnian Wahhabi movement, the ultra-conservative branch of Islam that dominates in Saudi Arabia. The group has been targeted in several police operations in the last few years.
During Bosnia's 1992-1995 war between its Croat, Muslim and Serb communities, a large number of volunteers from Muslim nations flocked to the Balkan country to take up arms.
Many of these Muslim fighters stayed on after the conflict ended and obtained Bosnian citizenship.
Bosnia's Muslims, who make up 40 percent of the Balkan country's 3.8 million inhabitants, mostly practise a moderate form of the religion, but according to security estimates there are 3,000 members of the Wahhabi movement.