NEW ORLEANS -- The last of the "Angola Three" inmates, Albert Woodfox, who's spent decades in solitary confinement, is now expected to stay behind bars until at least the end of the summer while he faces the possibility of a third trial in the 1972 slaying of a prison guard.

An appeals panel ruled Friday that Woodfox must stay in jail until it hears arguments in late August on Louisiana's push to retry him in the death of Louisiana State Penitentiary prison guard Brent Miller.

The decision marked a sharp reversal for Woodfox: On Monday, a lower-court judge ordered his "immediate" release, and took the extraordinary step of barring a third trial for the 68-year-old inmate. U.S. District Judge James Brady said there was no way the state could give him a fair trial.

The decision capped a tumultuous week in a case that focused international attention on the use of solitary confinement in American prisons.

Woodfox and two other black prisoners became known as the "Angola Three" for their decades-long stays in isolation at the Louisiana State Penitentiary at Angola, as well as other state prisons.

Lawyers broke the news of the appeals panel's ruling to Woodfox, who is being held at the West Feliciana Parish Detention Center, as reporters and family members of the slain guard gathered outside.

"He was stoic and remains hopeful," said George Kendall, one of Woodfox's lawyers, in an email to The Associated Press.

Outside the jail where Woodfox was held, about a dozen members of the guard's family had been waiting for a ruling. "Praise God," some of them said when the word came down.

"Whenever you murder somebody or do something wrong, you pay the price," said one of Miller's sisters, Wanda Callender. "Two juries said he was guilty. ... I would love for him to stay in prison the rest of his life."

Woodfox's previous convictions were overturned for reasons including racial bias in selecting a grand jury foreman and juror misconduct.

In questioning whether the state could fairly try Woodfox a third time, Brady noted that 43 years have passed since the crime, key witnesses have died and there is no physical evidence linking him to the crime.

But the state fought the decision, and on Friday the 5th U.S. Circuit Court of Appeals extended an emergency stay keeping him in jail until they hear arguments on the larger issue of whether the state can retry him.

Louisiana "has made a strong showing that it is likely to succeed on the merits of the appeal," the panel wrote. "No showing has been made that any state retrial (or any appeal) will be improperly handled."

Supporters have likened the terms of his incarceration to torture, but the state disputes the term "solitary confinement," saying that while in prison Woodfox was able to talk to other inmates, have visitors, watch television through the bars of his cell and leave the cell daily for an hour.

The other two members of the "Angola Three" were Herman Wallace, who died in October 2013, just days after a judge granted him a new trial in Miller's death, and Robert King, who was released in 2001 after his conviction in the death of a fellow inmate was overturned.

King now lives in Texas and has written a book about his experiences in prison. He said the legal ups and downs take a toll.

"I was loaded with a kind of nervous anticipation and I'm sure Albert is like that," he said. "It was pretty rugged."

The defence argued this week that Woodfox is in ill health and poses no danger to the community if freed pending the state's appeal.

The appellate panel was not persuaded.

"There is a substantial interest in staying the release of a person, twice convicted of murder ... from a life sentence without the possibility of parole," Judge Jerry E. Smith wrote.

The Louisiana attorney general's office maintains that Woodfox is a flight risk and too dangerous to set free.

"It has always been the State's priority to ensure justice for the brutal slaying of Brent Miller and to hold accountable this murderer who has an extensive history of violent crimes," said Aaron Sadler, a spokesman for the attorney general.

Associated Press writers Cain Burdeau in New Orleans and Brian Slodysko in St. Francisville, Louisiana, contributed to this report.