A terminally ill former Black Panther has had his murder conviction overturned after spending nearly 40 years in solitary confinement.

Herman Wallace, who has just weeks to live after being diagnosed with liver cancer, was originally sentenced to life imprisonment in 1974 for being part of a group known as the Angola Three, who were accused of killing a prison guard two years earlier.

But now, after spending close to 40-years locked up by himself in a tiny cell and allowed just one hour a day to shower and exercise, the 71-year-old has been freed after Judge Brian Jackson ruled the conviction unconstitutional.

Download the new Independent Premium app Sharing the full story, not just the headlines

All three men, who were initially imprisoned on robbery charges, have always maintained they were innocent of the prison guard murder and claimed they were only convicted because of their connections to militant black supremacist organisation the Black Panthers.

One of the three, Robert King, was released in 2001 but Wallace and another man, Albert Woodfox, have remained incarcerated.

Judge Jackson came to the decision after ruling that the barring of women from his jury was a violation of Wallace's right to a fair trial.

He said: “The record in this case makes clear that Mr Wallace's grand jury was improperly chosen… and that the Louisiana courts, when presented with the opportunity to correct this error, failed to do so,” Judge Jackson wrote in his decision.

Judge Jackson added: “The case of Herman Wallace is a tragic example of 'justice' gone wrong in the USA,” Tessa Murphy of Amnesty International said in a statement… Finally a federal court has acknowledged some of the unfairness surrounding this case. However this sadly comes too late for lasting benefit as he is at death's door with terminal cancer.”