For more than four hours he had stood in the dock in a packed, stately, wood-paneled courtroom in Pretoria, the heart of the white apartheid government, and had spoken without pause or interruption about his country and his politics and the reasons he had chosen to become an enemy of the state. And now came the moment of truth for Nelson Mandela.

“During my lifetime,” he intoned, “I have fought against white domination, and I have fought against black domination. I have cherished the ideal of a democratic and free society in which all persons live together in harmony and with equal opportunities.”

He raised his head to look squarely at the white judge. “It is an ideal which I hope to live for and to achieve,” he said. And he concluded with the line that his defense lawyers had pleaded with him to delete. “But if needs be, it is an ideal for which I am prepared to die.”

With his gentle but defiant statement, Mandela, at the age of 45, laid his life on the line at the Rivonia Trial on April 20, 1964. He and eight other defendants (by April, the charges against a 10th man had been dismissed) had been charged with sabotage, a capital offense punishable by hanging. Two months later, the judge found eight of the men guilty but issued a life sentence. Mandela spent a total of 27 years and eight months in prison before his release on Feb. 11, 1990.

The man who emerged that day was ready to lead his people, black and white alike. But his character was publicly forged, his credibility indelibly established and his political platform clearly laid out that April day in the Palace of Justice. He went on to practice exactly what he had preached — multiracialism, democracy and reconciliation.

The Washington Post’s Sudarsan Raghavan talks about the life and legacy of former South African president Nelson Mandela. (Thomas LeGro/The Washington Post)

The trial was the climax of a half-century of struggle between white-minority rule and the African National Congress, the principal political organization opposed to white domination. As the government turned increasingly to violent repression, the ANC and its supporters found themselves running out of peaceful options. After the ANC was banned altogether in 1960, Mandela and his comrades went underground and launched a sabotage campaign in December 1961, hoping to “bring the government to its senses” by blowing up public buildings, railway tracks and power lines while minimizing human casualties. But these tactics only caused the state to crack down harder, adopting arrest without trial, state-sanctioned killings and torture and other police-state methods. Eventually, the police raided the movement’s secret headquarters in Rivonia, a northern suburb of Johannesburg, and put Mandela — who had been behind bars since 1962 — and his partners on trial for their lives.

Even in the early days of the movement, it was clear to many of his comrades that Mandela was a natural leader with a keen mind and charismatic personality. “He was a giant, physically but also in terms of his moral stature,” recalled Lionel “Rusty” Bernstein, a white radical who was tried alongside Mandela. “We knew he was someone special.”

Now at the trial, Mandela and his close friend and fellow defendant Walter Sisulu led the defense strategy. They insisted on mounting a political argument, turning the proceeding into a show trial even at the risk of death. Although the state’s case was riddled with lies and inconsistencies, Mandela refused to deny his guilt. For weeks he worked on his public statement, which was polished and edited by novelist Nadine Gordimer and British journalist Anthony Sampson at Mandela’s direction.

He began by confessing he had helped found the underground resistance movement and had played a prominent role in the sabotage campaign. He read from a script, slowly and deliberately in a flat voice — the drama was all in the content and the circumstances. Within minutes, the courtroom was silent. Judge, prosecutors, defense team and the public, even the warders and the police, all seemed spellbound.

Mandela reviewed South Africa’s troubled history and said he had turned to violence “as a result of a calm and sober assessment of the political situation that had arisen after many years of tyranny, exploitation and oppression of my people by whites.”

He denied propaganda claims by the state that he and his people had acted under the influence of communists or foreign powers, declaring himself a supporter of parliamentary democracy. He gave a ringing statement of the ANC’s commitment to multiracialism. “Political division based on color is entirely artificial,” he said, “and when it disappears, so will the domination of one color group by another. The ANC has spent half a century fighting against racialism. When it triumphs, it will not change that policy.”

After Mandela sat down, no one moved or said a word. A handful of women in the public gallery cried softly, their muffled sobs wafting through the chamber. Finally the judge broke the spell. “You may call your next witness,” he told the defense team.

Frankel is The Post’s former southern Africa bureau chief. This article is adapted from his book, “Rivonia’s Children: Three Families and the Cost of Conscience in White South Africa.”