A federal appeals court has vacated the death sentence of Boston Marathon bomber Dzhokhar Tsarnaev, based on the opinion that the judge in the case did not vet the jury properly with regard to possible bias stemming from pretrial publicity.

“A core promise of our criminal-justice system is that even the very worst among us deserves to be fairly tried and lawfully punished — a point forcefully made by the then-U.S. Attorney for Massachusetts during a presser at the trial's end," the three-judge panel wrote.

They added: "To help make that promise a reality, decisions long on our books say that a judge handling a case involving prejudicial pretrial publicity must elicit 'the kind and degree' of each prospective juror's 'exposure to the case or the parties,' if asked by counsel, see Patriarca v. United States, 402 F.2d 314, 318 (1st Cir. 1968) — only then can the judge reliably assess whether a potential juror can ignore that publicity, as the law requires. But despite a diligent effort, the judge here did not meet the standard set by Patriarca and its successors.”

Tsarnaev was convicted and sentenced to death in 2015 for carrying out the April 15, 2013 attack at the marathon finish line with his older brother Tamerlan Tsarnaev, who died in a shootout with police after a manhunt.

BOSTON MARATHON BOMBING SURVIVOR FLIPS OFF 'TERRORIST SUPPORTER' OUTSIDE COURT

The attack at the marathon killed three people and injured more than 260 others. Tsarnaev's lawyers had been trying to overturn his death sentence. They said it was impossible to find a fair jury in Boston because the explosions traumatized the region.

Many of the charges Tsarnaev was convicted on were upheld by the appeals court, but on those death-eligible counts, the court ordered a new penalty-phase trial. So Tsarnaev could again be sentenced to death, but the government must first decide whether it wants to pursue capital punishment.

The Justice Department now has the option of asking the entire “en banc” appeals court in Boston to hear the appeal or the DOJ could ask the Supreme Court to review the case.

The three judges who issued the decision were: Juan Torruella, a Reagan appointee who dissented in part; Rogeriee Thompson, an Obama appointee who wrote the opinion; and William Kayatta, who is also an Obama appointee.

CLICK HERE TO GET THE FOX NEWS APP 

Fox News reached out to the US Attorney’s office, and they said they are reviewing the opinion and will have more to say in the coming weeks.

Fox News' Bill Mears, Andrew Fone and The Associated Press contributed to this report.