Denis Goldberg, one of two surviving political activists convicted on the so-called Rivonia Trial, which put Nelson Mandela and seven others in prison and proved a turning point in South Africa’s long struggle against apartheid, died April 29 in Cape Town. He was 87.

Mr. Goldberg’s career, first in the armed resistance movement and later in the post-apartheid era, encapsulated much of his country’s modern history, from the racial nuances of the struggle against white minority rule to the reluctant acknowledgment of the corruption that became a byword in early 21st-century South Africa.

The hearings came at a crucial juncture in South African history. The authorities there had increasingly resorted to force in suppressing opposition to apartheid, the white rulers’ draconian system of racial separation, and their adversaries had turned to armed struggle in response. The trial was intended to crush and silence Mr. Mandela and his followers. But the prisoners turned the occasion into a global indictment of apartheid.

Mr. Goldberg served 22 years in prison, until 1985. Mr. Mandela was freed in 1990.