South Africa’s President Jacob Zuma addressed his country and the rest of the world Thursday to announce the peaceful passing of Nelson Mandela in his Johannesburg home. Along with the rest of the world, China’s political figures, dissidents and general public alike joined in remembering the former South African leader.

China’s Foreign Ministry called Mandela an “old friend” to China; President Xi Jinping said the Chinese people would “always remember his contributions to China-South Africa relations and human progress.” Diplomatic ties were officially established with the help of Mandela in 1998.  China’s state media highlighted Mandela’s role in liberating oppressed people in South Africa, and around the world; many reports drew parallels to China’s revered revolutionary leader Mao Zedong.

While people praised by China’s top-level politicians can often be divisive characters, Mandela proved to be an inspiration not only for Chinese authorities but also for the nation’s dissidents. “His example of a peaceful path is one that China’s supporters of a transition have constantly thought about and want to emulate,” Cui Weiping, a writer and former professor of literature who has written on the subject of human rights, said, according to the New York Times. For many political dissenters, Mandela was a beacon of hope for improved human rights conditions in China, and a symbol of endurance. For Gao Xiaoliang, Mandela’s life experiences helped him get through his detention; he was sentenced to prison for participating in the 1989 pro-democracy movement that was crushed in Beijing's Tiananmen Square. Gao said that Mandela’s decades-long imprisonment, though certainly trying, is a point of inspiration. “He was in for 27 years, why should I be afraid of nine years,” Gao said. “If I hadn’t had Mandela’s spiritual encouragement during those nine years, I probably would have killed myself.”

Gao recalls Mandela’s election win in 1994, and knew immediately that the victory was meaningful beyond South African borders. “His win in a democratic presidential election wasn’t just a victory for Mandela, it was a victory for justice,” Gao, who found out while in prison, said. “I was very moved, and my heart was consoled.”

With the passing of such an iconic figure, China’s Internet public also chimed in. On popular Chinese social media platform Weibo, which is similar to Twitter, condolences started rolling in. “Mandela has gone far away, but he has truly had massive resonance in all manner of countries with all manner of systems,” real estate mogul Ren Zhiqiang wrote on his blog. But for those in China hoping for change, the loss of Mandela has left a void that some are desperate to fill. “China doesn’t have segregation by race, but it does have segregation by privilege,” a political cartoonist going by the name Jicama Brother wrote, according to the Wall Street Journal. “China needs a Mandela who leads the grass-roots to fight for the rights enjoyed only by the privileged class,” he added.

“China needs rule of law, but it needs someone like Mandela more,” Zhu Dingwei, a lawyer, wrote.