South Africans of all races flocked to houses of worship Sunday for a national day of prayer and reflection to honor Nelson Mandela, as a large contingent of foreign dignitaries, including royalty, begin arriving in the country to pay their final respects to the anti-apartheid icon.

The government said Sunday that 53 heads of state and government, as well as a large number of prominent people, had confirmed that they would attend a national memorial service and state funeral for the country’s first black president. Tuesday’s memorial service is expected to be one of the biggest in modern times.

Hundreds attended Mass at Regina Mundi church, which was at the epicenter of the Soweto township uprising in 1976 against white rule. The Rev. Sebastian J. Rossouw described Mandela as “moonlight,” saying he offered a guiding light for South Africa.

“Madiba did not doubt the light,” Rossouw said, referring to Mandela by his clan name. “He paved the way for a better future, but he cannot do it alone.”

Worshipers offered special prayers for the revolutionary leader. At the side of the sanctuary was a black-and-white photo of Mandela, who died Thursday at age 95.

Mandela’s ex-wife, Winnie Madikizela-Mandela, joined one of his grandsons, Mandla Mandela, and South African President Jacob Zuma at a Methodist church prayer service in Johannesburg.

“We felt it important that we should have a day where all of us as South Africans can come together and pray for our first democratic president and reflect on his legacy,” Zuma said. “But it is also to pray for our nation . . . to pray that we not forget some of the values he fought for.”

Zuma noted that Mandela had forgiven even those who had kept him in prison for 27 years and that he had opposed domination by whites or blacks.

Inside a small, hilltop church behind Mandela’s property in the eastern village of Qunu, where he will be buried this coming Sunday, about 50 people held a raucous, celebratory service. A man in a blue robe set the tempo by banging on a goat-skin drum. Men, clapping, huddled as mostly barefoot women danced on the cement floor in a circle around them.

Joshua Mzingelwa, the leader of Morians Episcopal Apostolic Church, delivered a loud, throaty sermon.

“There is still hope in the hardship that you are facing daily,” Mzingelwa told congregants.

In an affluent and predominantly white suburb of Pretoria, the capital, parishioners prayed for Mandela at what was once a worship center for pro-apartheid government and business leaders. They prayed in silence as a picture of Mandela was beamed onto the wall above the pulpit, starkly highlighting the enormous changes in this country.

Pastor Niekie Lamprecht of the Dutch Reformed Church of Pretoria East said that the congregation’s 1,600 mostly white parishioners have changed and that Mandela was the driving force. Two decades ago, he said, showing Mandela’s picture in the church would have been unthinkable.

“What helped the white people of South Africa was Mr. Mandela’s attitude,” Lamprecht said. “He said, ‘Let’s forgive,’ and he forgave. That created a space for people to feel safe . . . at a time when the expectation was that there was going to be a war.”

A service also was held at St. George’s Cathedral in Cape Town, where worshipers said a prayer together for a man whose journey from prisoner to president inspired the world: “May his long walk to freedom be enjoyed and realized in our time by all of us.”

— Associated Press