The 68-year-old has been almost entirely in solitary confinement since 1972, following the killing of a prison guard. Woodfox is the only member of the group of three prisoners convicted of the murder, known as the Angola Three, still behind bars.

Woodfox faced a retrial in 1998 after his original conviction was reversed, but the new trial found him guilty and #link:http://www.amnestyusa.org/sites/default/files/uaa02915_2.pdf:reconvicted him of murder#. In November 2014, the 5th US Circuit Court of Appeals upheld a lower court's decision to overturn his conviction. An earlier review had found deficiencies in the defense counsel and weakness in the state's case.

But in February this year, the state of Louisiana #link:http://www.amnestyusa.org/news/press-releases/amnesty-international-usa-responds-to-re-indictment-of-albert-woodfox:re-indicted Woodfox# for the 1972 murder. Monday's ruling means the state is barred from holding a second retrial.

"Mr. Woodfox has remained in the extraordinary conditions of solitary confinement for approximately 40 years now, and yet today there is no valid conviction holding him in prison, yet alone solitary confinement," US Federal District Judge James Brady said in his #link:http://media.nola.com/politics/other/A%20Crim%20Case%2034%20-%20Unconditional%20Writ%20060815.pdf:order for Woodfox's release#.

Brady ruled there were at least five factors supporting his decision.

"The five factors include: Mr. Woodfox's age and poor health, his limited ability to present a defense at a third trial in light of the unavailability of witnesses, this court's lack of confidence in the state to provide a fair third trial, the prejudice done onto Mr. Woodfox by spending over 40 years in solitary confinement, and finally the very fact that Mr. Woodfox has already been tried twice and would otherwise face his third trial for a crime that occurred over 40 years ago."

Woodfox has mostly been held in the Louisiana State Penitentiary at Angola. He was serving an unrelated sentence there for armed robbery when the prison guard was murdered.

He is the only member of the Angola Three still in jail. After 29 years in solitary confinement, Robert King was freed in 2001. The last member, Herman Wallace, died a few days after being released in October 2013. He had spent more than 41 years in prison.

Woodfox maintains his innocence in the murder, believing he and the other two men were targeted because of their activism in the prison's chapter of the Black Panther Party.

There are indications the state of Louisiana might appeal Brady's decision. Aaron Sadler, a spokesman for the Louisiana Department of Justice, #link:http://www.nola.com/news/baton-rouge/index.ssf/2015/06/albert_woodfox_angola_release.html:reportedly said# the order "arbitrarily sets aside jury decisions" based on "faulty procedural issues."

"With today's order, the court would see fit to set free a twice-convicted murderer who is awaiting trial again for the brutal slaying of Corrections Officer Brent Miller," Sadler said.

Sadler said the state is seeking an emergency stay from the 5th US Circuit Court of Appeals to ensure Woodfox remains behind bars.