A US judge has ordered the release of a Louisiana jail inmate who has spent more than 40 years in solitary confinement.

The last of the Angola Three inmates, Albert Woodfox, 68, whose decades in solitary confinement drew international condemnation and became the subject of two documentaries, was ordered released on Monday.

Human-rights experts have said his confinement constituted torture.

US District Judge James Brady of Baton Rouge 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 US Circuit Court of Appeals "to make sure this murderer stays in prison and remains fully accountable for his actions".

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.

Previous convictions

Woodfox has been tried twice in the guard's death, but both convictions were overturned.

The state is seeking to bring him to trial a third time. But Brady said a third trial could not be fair.

In making his rare ruling, 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 a "lack of confidence" that Louisiana 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 40 years in solitary confinement," and "the very fact that Mr. Woodfox has already been tried twice".

Woodfox was in solitary confinement at a prison in St Francisville, Louisiana, awaiting trial.

His lawyers were headed there Monday to seek his release.

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

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

Aaron Sadler, a spokesman for Louisiana's Attorney General Buddy Caldwell, said the state was seeking an emergency stay of Brady's ruling from the 5th US 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."

Woodfox and two other state prisoners became known as the Angola Three due to their long stretches in solitary confinement at the Louisiana State Penitentiary in Angola.

Other members of the Angola Three were prisoners Robert King and Herman Wallace.

Woodfox and Wallace had said they were singled out for harsh treatment, including isolation, because of their political activism.

Wallace, convicted with Woodfox of murder in the death of guard Brent Miller, died last year 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.

Amnesty International, in a campaign to free the Angola Three, said the decades of solitary confinement had had a clear psychological effect on Woodfox, and he suffered from serious health problems caused or made worse by his years of close confinement.