President Jacob Zuma has said he did not attend the funeral of a South African apartheid-era leader after Ahmed Kathrada's family asked him to stay away.
Kathrada died on Tuesday at the age of 87 after being admitted for surgery linked to blood clotting on the brain.
He was imprisoned for years along with Nelson Mandela for opposing the former white minority government.
Kathrada last year called on President Zuma to step down after numerous corruption allegations.
The funeral attendees rose in a standing ovation when Kgalema Motlanthe, a former deputy president under Zuma, quoted from Kathrada's letter urging the president to go.
There was another standing ovation for Finance Minister Pravin Gordhan, whose strong reputation as a bulwark against corruption has raised investor fears that President Zuma will soon fire him.
A statement from Zuma's office said the president would respect the wishes of Kathrada's family for him to stay away.
It also said South Africa "has lost one of its valuable and most respected freedom fighters".
Kathrada's coffin was covered in the flag of the ruling African National Congress party.
Mandela's ex-wife Winnie Madikizela Mandela, 80, attended the funeral.
Kathrada was born in 1929 to a scholarly Muslim family and became involved in political activism at the age of 11.
He and Mandela were part of a group sentenced to life imprisonment after the historic Rivonia trial of top ANC activists in 1964.
Kathrada was released from prison in 1989, just months before Mandela himself walked free.
During the past year, Kathrada was a regular at demonstrations and marches around South Africa, frequently offering his support to students protesting for free education.
In April last year, after South Africa's highest court found that President Zuma had violated his oath of office by refusing to abide by an order to pay back some of the millions of dollars in public money spent on upgrading his rural home, Kathrada wrote a letter to the president asking him to step down.
"Dear Comrade President, don't you think your continued stay as president will only serve to deepen the crisis of confidence in the government of the country," Kathrada wrote.
Kathrada was married to former government minister Barbara Hogan, who was sentenced to 10 years in jail for high treason against the apartheid government in 1982.
Why are you making commenting on The National only available to subscribers?
We know there are thousands of National readers who want to debate, argue and go back and forth in the comments section of our stories. We’ve got the most informed readers in Scotland, asking each other the big questions about the future of our country.
Unfortunately, though, these important debates are being spoiled by a vocal minority of trolls who aren’t really interested in the issues, try to derail the conversations, register under fake names, and post vile abuse.
So that’s why we’ve decided to make the ability to comment only available to our paying subscribers. That way, all the trolls who post abuse on our website will have to pay if they want to join the debate – and risk a permanent ban from the account that they subscribe with.
The conversation will go back to what it should be about – people who care passionately about the issues, but disagree constructively on what we should do about them. Let’s get that debate started!
Callum Baird, Editor of The National
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here