Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The last of the "Angola Three" inmates, whose decades in solitary confinement on a Louisiana prison farm drew international condemnation and became the subject of two documentaries, was ordered released Monday.

The ruling would free 68-year-old Albert Woodfox after more than 40 years in solitary, which human rights experts have said constitutes torture.

U.S. District Judge James Brady of Baton Rouge, Louisiana, ordered the release of Woodfox and took the extraordinary step of barring Louisiana prosecutors from trying him for a third time.

A spokesman for the Louisiana attorney general said the state would appeal Brady's ruling to the 5th U.S. Circuit Court of Appeals "to make sure this murderer stays in prison and remains fully accountable for his actions."

Related: 'Angola 3' Member Herman Wallace Three Days After Being Freed From 41 Years of Solitary

Tory Pegram of the International Coalition to Free the Angola 3, who is working with Woodfox's lawyers on his release, said they are all "thrilled that justice has come for our innocent friend."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Woodfox was placed in solitary confinement in 1972 after being charged in the death of a Louisiana State Penitentiary guard in April of that year. The prison farm is more commonly known as the Angola prison and it is Louisiana's only maximum-security prison.

Woodfox and two other state prisoners became known as the Angola Three because of their long stretches in solitary confinement at Angola. Other members of the Angola Three were prisoners Robert King and Herman Wallace.

Woodfox and Wallace, who were both serving unrelated armed robbery sentences, had said they were singled out for harsh treatment, including isolation, because of their political activism. Woodfox and Wallace were former Black Panthers and helped establish a prison chapter of the Black Panther Party at the Angola prison in 1971, set up demonstrations and organized strikes for better conditions.

Wallace, convicted with Woodfox of murder in the death of guard Brent Miller, died in 2013 only days after a judge freed him and granted him a new trial. King was released in 2001 after his conviction in the death of a fellow inmate in 1973 was reversed.

Woodfox has been tried and convicted twice in the guard's death, but both convictions were overturned. Brady said the "exceptional circumstances" of the case had led him to bar the state from seeking a third trial. In his ruling, he cited doubt that the state could provide a "fair third trial"; the inmate's age and poor health; the unavailability of witnesses; "the prejudice done onto Mr. Woodfox by spending over forty years in solitary confinement," and "the very fact that Mr. Woodfox has already been tried twice."

Woodfox is in solitary confinement at a prison in St. Francisville, Louisiana, awaiting trial. His lawyers were headed there Monday to seek his release. Pegram said Woodfox gets to exercise for one hour three times a week during his confinement at the West Feliciana Parish Detention Center. He has a television to watch and a shower in his cell, she added.

Of Brady's order for an unconditional release, Pegram said, "I call it the unicorn. It's almost never done."

Jasmine Heiss, a senior campaigner with Amnesty International USA, called Brady's ruling "a momentous step toward justice."

Heiss said Woodfox has been "trapped in a legal process riddled with flaws."

"The only humane action that the Louisiana authorities can take now is to ensure his immediate release."

At the same time, though, state prosecutors were working to keep Woodfox in prison.

Aaron Sadler, a spokesman for Louisiana Attorney General Buddy Caldwell, said the state was seeking an emergency stay of Brady's ruling from the 5th U.S. Circuit Court of Appeals in New Orleans.

"With today's order, the court would see fit to set free a twice-convicted murderer," Sadler said. "This order arbitrarily sets aside jury decisions and gives a free pass to a murderer based on faulty procedural issues."