Dzhokhar Tsarnaev, the Boston Marathon bomber, has had his death sentence overturned by an appeal court.
Tsarnaev and his older brother set off a pair of homemade pressure-cooker bombs near the finish line of the race in 2013. Three people died and more than 260 were injured.
Days later they hijacked a car and shot dead a police officer. Tsarnaev's brother died that night after a gunfight with police.
In 2015 Dzhokhar Tsarnaev was convicted and a jury decided he deserved execution.
Tsarnaev's lawyers argued the case should not have been tried in Boston, where potential jurors were exposed to blanket media coverage about the attacks.
On Friday an appeal court in Boston upheld much of Tsarnaev's conviction but ordered a lower-court judge to hold a new trial strictly over what sentence he should receive.
However, a judge said: "But make no mistake, Dzhokhar will spend his remaining days locked up in prison, with the only matter remaining being whether he will die by execution."
Tsarnaev's lawyers acknowledged at the beginning of his trial that he and his older brother, Tamerlan Tsarnaev, set off the two bombs at the marathon finish line.
But they argued that Dzhokar Tsarnaev was less culpable than his brother, who they said was the mastermind behind the attack.