The world loves heroes, as we have been reminded by the divers who rescued the Thai boys stranded underground for 18 days, particularly brave and modest heroes. It also needs role models. And never more so than in this age of Donald Trump and Jacob Zuma – and nowhere more so than in South Africa.

The fall of Zuma, after years of allegations of corruption, cronyism and state capture, and the election of Cyril Ramaphosa, mark the most pivotal moment in the history of South Africa since the first free and democratic election on 27 April 1994.

Last month I was privileged to be invited to the 93rd birthday party of Andrew Mlangeni, one of Nelson Mandela’s two surviving co-defendants at the 1964 Rivonia trial, where they were sentenced to life in prison for trying to overthrow apartheid by sabotage. Everyone knows that Mandela spent 27 years in prison. Very few know that Mlangeni was jailed for 26 years, that he was tortured under interrogation and that whenever his wife got a job to support their children, the special branch intimidated her employers into sacking her. Without the support of the Anglican church, they would have starved.

'I did it for freedom' – Nelson Mandela's quiet comrade Read more

The guest of honour at the party was President Ramaphosa. In his speech, he said that at Mandela’s funeral a leader of another country had told him that South Africa was uniquely blessed in the most precious natural asset any country can have: living heroes. The first time Ramaphosa met Mlangeni was as a member of the reception committee when he and his comrades were released from prison. The three leaders, Mandela, Walter Sisulu and Govan Mbeki, were famous but Ramaphosa knew nothing of Mlangeni. He soon recognised Mlangeni shared their integrity and, when the ANC needed a chairman for its ethics committee, Mlangeni was the obvious choice. Twenty-eight years later, he is a man Ramaphosa seeks to emulate. He rechristened him Comrade Integrity.

Four years ago, I stumbled across the stories of the Rivonia trial defendants and lawyers. I was surprised how few people, me included, knew their names, let alone their extraordinary stories.

If I were a young South African, I would want to know about them – and I’m sure that, once I found out about them, I would be inspired to ask: if these ordinary people were prepared to risk their lives, endure torture and a quarter-century in prison to achieve a free and democratic society, what can I do to make the world a better place?

Perhaps it requires such a depth of oppression to create such heights of character Nelson Mandela on apartheid

I discovered that three defendants, Mlangeni, Denis Goldberg and “Kathy” Kathrada, and three of the lawyers, Joel Joffe, George Bizos and Denis Kuny, were still alive and still striving to make the world a better place. I hired a young cameraman, James Callum, to tell their stories through their own voices. We spent a month interviewing – in the Rivonia safe house where most had been arrested; in Court C of the Pretoria supreme court, where they were tried; and on Robben Island, where Goldberg, the only white defendant convicted, was prevented from serving his sentence with his comrades. The minds of these octogenarians were razor sharp, their commitment to justice undimmed. Two themes stood out. First, they came to the struggle from very different backgrounds. In the words of Mlangeni: “We were multiracial comrades whose aim was to establish a multiracial democracy.” At a time when it is alarmingly fashionable among some young South Africans to say that Mandela sold out to the whites, that is critical.

The notorious Bell Pottinger campaign, designed to distract attention from state capture, which put all the blame for South Africa’s slow economic transformation on post-colonial white capital, fell on fertile soil. The “born frees” never experienced apartheid and can take for granted the political freedoms won by Mandela and the others. I witnessed this twice in Q&As after screenings of my film in South Africa last month. In Khayelitsha township, as soon as the credits rolled, a young man declared that South Africa belonged to the blacks and that whites had no place in it. I pointed out that he had just seen Denis Goldberg put his own life on the line to try to save the black ANC leaders. Did he think Goldberg had no right to live in the country?

Facebook Twitter Pinterest Rivonia convicted (from the top, left to right): Nelson Mandela, Walter Sisulu, Gowan Mbeki, Raymond Mhlaba, Elias Motsoaledi, Andrew Mlangeni, ‘Kathy’ Kathrada and Dennis Goldberg. Photograph: Radu Sigheti/Reuters

At the Institute for African Alternatives, two others said the film had changed their view of Mandela because they had not known that he instructed lawyers to turn the trial from a legal into a political one, in which apartheid was put in the dock of world opinion. He had put his cause before his life.

Mandela’s speech from the dock ended with the declaration that he had fought both white domination and black domination; and that a free and democratic society in which all people live together with equal opportunities was an ideal for which he was prepared to die. Eight months earlier, Martin Luther King had made his “I have a dream” speech, in which he dreamed of a world in which “my four little children … will not be judged by the colour of their skin but by the content of their character”.

The message of those two speeches led to an end of apartheid in South Africa and, much more quickly, to an end to segregation in the US deep south. It is a truth that is no less important because of temporary setbacks.

Facebook Twitter Pinterest Andrew Mlangeni with the Duchess of Sussex and Peter Hain at the Nelson Mandela centenary exhibition at Southbank Centre, London, last week. Photograph: Arthur Edwards/The Sun/PA

Mandela’s speech had been approved by all the defendants and he was challenging the judge to hang them all. Everyone only has one neck and two of the defendants were white and one was Indian. What converted Mandela from a narrow Africanist position in 1948 to his commitment to multiracialism by 1964 was his experience of working with whites and Indians who were prepared to make the same sacrifices as black people.

That leads to the second theme. There were three towering figures at the trial: Mandela, Sisulu and Bram Fischer QC, each of whom contributed to saving the 10 defendants from the gallows. When “Rusty” Bernstein, one of the accused, heard that Fischer had taken the defence brief he said he deserved a VC, because he risked being identified by farm labourers who had seen him attend meetings at the safe house. But the others were no less brave. Kathrada and Raymond Mhlaba were told that appeals against conviction and sentence would probably succeed. They declined and chose 26 years in prison with their comrades.

Mandela wrote: “The policy of apartheid created a deep and lasting wound in my country and my people. All of us will spend many years, if not generations, recovering from that profound hurt but the dictates of oppression and brutality had another unintended effects, and that was it produced … men of such extraordinary courage, wisdom and generosity that their like may never be known again. Perhaps it requires such depth of oppression to create such heights of character.”

Fifty years later, I was struck that the three Rivonia survivors had never tried to trade on it or cash in on their access to the top of the ANC. They all lived, and two of them still live, extremely modestly. As the initial Ramaphoria wanes, it is encouraging to recall that, at the grand parade in Cape Town, just before he was sworn in, Ramaphosa planted his flag firmly in the soil of returning to the integrity of Mandela and the Rivonia trialists.

Sir Nicholas Felix Stadlen is a former high court judge. His film, Life is Wonderful: Mandela’s Unsung Heroes, can be seen free at the Southbank Centre, London, 27-29 July