South African President Jacob Zuma visited Nelson Mandela on Wednesday night and said the anti-apartheid icon remained in “critical condition” at a Pretoria hospital.

Mr. Zuma said he was cancelling a Thursday trip to Mozambique, where he was to attend a regional summit. On Friday U.S. President Barack Obama is expected to visit South Africa as part of a whistle-stop tour through Africa.

“President Zuma was briefed by the doctors, who are still doing everything they can to ensure his well-being,” according to a statement from the presidency.

A member of the family said Mr. Mandela was now on life-support, which the government declined to confirm.

The wall outside Mandela’s hospital became a makeshift tribute with balloons, bouquets and hand-drawn cards created by children for the ailing South African leader.

It was the 19th day of his latest hospitalization for a recurring lung infection and his third day in critical care.

A steady stream of friends, family and religious leaders visited the 94-year-old anti-apartheid hero this week at the hospital, as his large family and tribal leaders huddled privately.

Outside the gated walls of the Pretoria heart clinic, well-wishers stood vigil late into the night to burn candles and leave messages and flowers for Madiba, the clan name South Africans use affectionately when referring to the father of the modern, democratic nation.

Edith Ndlovu, who remembered being in Johannesburg during the 1976 Soweto youth uprisings against the apartheid regime, laid a wreath of flowers at the gate.

“I decided I should come, even if I won’t be able to see him. I grew up during the apartheid era, and I know what we went through. It is because of him that today we are liberated and that today we have dignity as a nation. It is because of Mandela,” she said, holding back tears.

“We learned from him. He taught us love — to love one another, a South Africa for all of us, without any discrimination. And most of all forgiveness — he taught us this. His legacy will live on, and we will try our best to make South Africa a better country.” People across South Africa were focused on Mandela’s health and coming to terms with his mortality.

“It is not unexpected, and it is inevitable, but still one does not want to think about it actually happening,” said Amanda, a woman in Johannesburg who was anxiously searching for any new information on the former president. “It will be very sad for us.” Mr. Mandela’s family met Tuesday in the rural Eastern Cape, from where the liberation leader hails, to hold traditional prayers and conduct what have been described as sensitive talks.

A delegation of elders from the abaThembu clan in Qunu, Mandela’s ancestral village, has travelled to Pretoria and Johannesburg to hold further discussions with the family.

Mr. Mandela spent 27 years imprisoned for his role in the struggle against white-minority rule. After being freed in 1990, the African National Congress (ANC) leader pursued an agenda of racial reconciliation and unifying the nation.

He was elected as the country’s first black president in 1994, the first time the black majority was granted the franchise after centuries of white domination.

He stepped down after one five-year term and since 2004 has largely retired from public life.

More In: World | International