JOHANNESBURG—A South African archbishop who visited Nelson Mandela in a hospital has offered a prayer in which he wishes for a “peaceful, perfect, end” for the former president and anti-apartheid leader.

There was no word early Wednesday on 94-year-old Mandela’s condition, which was critical a day earlier, according to the government. Outside the Pretoria hospital where he was being treated, well-wishers have left flowers, drawings and messages of support for a man regarded as a symbol of sacrifice and reconciliation in a country that emerged from white minority rule to become a democracy two decades ago.

“Let’s accept instead of crying,” said Lucas Aedwaba, a security officer who described Mandela as a hero. “Let’s celebrate that the old man lived and left his legacy.”

Thabo Makgoba, the Anglican archbishop of Cape Town, posted a prayer on Facebook on Tuesday night after visiting the hospital where Mandela is being treated.

In the prayer, Makgoba asked for courage to be granted to Mandela’s wife, Graca Machel, and others who love him “at this hard time of watching and waiting,” and he appealed for divine help for the medical team treating Mandela, who was taken to the hospital on June 8 with what the government said was a lung infection. President Jacob Zuma said Mandela’s condition, previously described as serious but stable, had deteriorated to critical over the weekend.

“May your blessing rest upon Madiba now and always,” Makgoba said in the prayer, using Mandela’s clan name. “Grant him, we pray, a quiet night and a peaceful, perfect, end.”

He wished that Mandela would be granted relief from pain and suffering, and also said: “Uphold all of us with your steadfast love so that we may be filled with gratitude for all the good that he has done for us and for our nation, and may honour his legacy through our lives.”

On Tuesday, members of Mandela’s family and tribal elders gathered in Qunu, his rural hometown in eastern South Africa. No details on what was discussed in the meeting were announced. Those at the gathering included Mandela’s grandsons Mandla and Ndaba Mandela, according to South Africa media.

Mandela spent 27 years in prison during white racist rule and became South Africa’s first black president in all-race elections in 1994, playing an indispensable role in steering the country through a tense transition that many feared would deteriorate into widespread bloodshed. After his presidency, he focused his work on charitable causes, but withdrew from public life years ago and became increasingly frail in recent years.

He last made a public appearance in 2010 at the World Cup soccer tournament, which was hosted by South Africa. At that time, he did not speak to the crowd and was bundled against the cold in a stadium full of fans.

Dan Lehman, an American academic, chose a jogging route on Wednesday morning that passed by the hospital where Mandela is being treated.

“I was just going out for my morning run down here and come to pay my respects to the greatest man in the world,” Lehman said. Then he began to cry.