JOHANNESBURG – Jakes Gerwel, who advocated for the end of apartheid in South Africa and became a longtime friend and trusted aide to former President Nelson Mandela, died Wednesday. He was 66.

Gerwel, an academic who found himself at the forefront of the nation’s politics following Mandela’s electoral win in 1994, had been in critical condition since undergoing heart surgery earlier this week at a hospital in Cape Town, said Sello Hatang, a spokesman for the Nelson Mandela Foundation. Gerwel died while still in the hospital’s care, Hatang said.

Condolences came in from around South Africa for Gerwel, known to many as “Prof” from his time teaching Afrikaans literature to university students.

“South Africans will remain eternally grateful to Professor Gerwel for laying a strong administrative foundation (that made concrete) the new ethos of a free and non-racial South Africa …,” President Jacob Zuma said in a statement.

Born Gert Johannes Gerwel in January 1946, Gerwel grew up on a sheep farm under the apartheid government, which segregated its population into crude racial categories of Asian, black, white and “colored.” He graduated from the University of the Western Cape and later served as rector there. All the while, he protested against the apartheid government and was arrested several times.

Gerwel later joined the African National Congress and served as then-President Mandela’s director-general, a South African version of a chief of staff. He routinely briefed journalists after major government meetings and served as a trusted sounding board to Mandela as he sought to unify a nation reeling from centuries of white rule, police abuses and crushing poverty for its majority black population.

Gerwel stepped out from behind Mandela’s shadow in 1999, negotiating with Libya’s ruler, Moammar Gadhafi, to have him extradite two intelligence agents suspected of carrying out the 1988 bombing of a Pan Am airliner over Lockerbie, Scotland.