Former South African President and civil rights icon Nelson Mandela has died. He was 95.

Mandela opposed South Africa’s racist apartheid peacefully, then violently, and then spent 27 years imprisoned in South Africa’s most notorious prison. When he was released in February 1990 as the world’s most famous political prisoner, he was set on an inevitable path to the country’s presidency.

What was not inevitable was how Mandela behaved. He was one of the most trusted figures in South Africa, and around the world. He could have abused the trust and power he had earned by punishing his enemies. He could have used his imprisonment to grant himself a presidency for life.

Like George Washington, though, Mandela eschewed the chance to become a king and served only one term as president. No man is perfect, and Mandela had his flaws like anyone else, but he set an example for his successors, both to leave power, and to forgive when it would be easy and popular to pursue vengeance. Given the chance to either unite South Africa or divide it, he chose to unite it. He did not punish his enemies, however they might have deserved it. Mandela famously said that he opposed white domination, and then opposed black domination, in South Africa. And he was as good as his word on that. His choices undoubtedly saved lives and preserved a fragile nation.

It’s worth nothing that South Africa has had the most successful transition from colonialism to independence in Africa. Nelson Mandela’s choices go a long way to explaining why.