For most of the past 41 years, Herman Wallace was allowed to leave his 6-by-9-foot Louisiana prison cell for only an hour a day a few times a week. He foresaw no end to the hours and days of his solitary confinement.

Convicted in the fatal 1972 stabbing of a prison guard, Wallace maintained his innocence and used his time behind bars to draw attention to abusive prison conditions. His legal appeals brought his freedom last week when a federal judge in Baton Rouge ruled his indictment had been unconstitutional because the grand jury excluded women.

Wallace had only a few days to savor the victory.

One of the “Angola 3,” whose long-term solitary confinement at Louisiana State Penitentiary in Angola became a cause celebre for prison reform advocates, Wallace died of complications of liver cancer Friday in New Orleans, his attorneys said. He was 71.

He had left solitary confinement for a prison hospital ward in June after the cancer was diagnosed. It took two orders from the federal judge and a threat of contempt before prison officials released him Oct. 1.

“He didn’t say a lot. He was exhausted,” said Ashley Wennerstrom, a friend of Wallace’s who was waiting for him when he got out. “We told him he was free. He nodded and he knew.”

Wallace was never told that the day before he died a grand jury in West Feliciana Parish, north of Baton Rouge, had re-indicted him in the prison guard’s death.

“Everybody says why indict a man who is about to die?” District Attorney Sam D’Aquilla said in an interview Tuesday. “Because he was a murderer.”

Wallace entered the Angola prison in 1971 after a conviction for armed robbery. He was sent to solitary confinement in 1972 after he and two other inmates were accused of killing Brent Miller, a corrections officer. Of the three, two were convicted: Albert Woodfox in 1973 and Wallace in 1974. Their convictions were largely based on witness testimony from other prisoners, including a repeat rapist who was later found to have helped the prosecution in exchange for a reduced charge.

For nearly every hour of every day for four decades, Wallace and Woodfox were held in separate closet-sized cells. Their contact with the outside world was limited to occasional visits and phone calls. A few times a week they were allowed outdoors to exercise.

“A lot of people will tell you it’s hard to imagine a worse thing one human being can do to another: lock you in a space the size of a small bathroom or closet and say that’s your home for 20 or 30 years,” said George Kendall, one of Wallace’s attorneys. “For some, it becomes very hard to leave the cell. You’re so de-socialized you can’t live around other people. Both Herman and Albert Woodfox were determined that was not going to happen to them.”

Wallace filled his waking hours with reading and correspondence. With Woodfox and a third inmate in solitary confinement, Robert King, he also organized a chapter of the Black Panthers, the black nationalist group, and began mobilizing other African-American inmates against brutal conditions inside Angola, including rampant prison rapes.

The Angola 3, as they came to be known, maintained that they were kept in solitary as payback for their political activities.

Amnesty International began campaigning for their release from isolation in the late 1990s. In 2008, U.S. Rep. John Conyers, D-Mich., traveled to Angola to meet with the men and released a statement noting that they had been kept in isolation for “possibly a longer period than any other inmate in U.S. history.”

Attention continued to build with the 2010 documentary “In the Land of the Free,” directed by Vadim Jean, which focused on the Angola 3.

Wallace was born in New Orleans on Oct. 13, 1941.