“He’s getting better,” said Mandla, who is the traditional chief of nearby Mvezo village.

Qunu is one of the emotional centers of Mr. Mandela’s life. He spent his early childhood here, living with his mother in a cluster of mud-walled huts, roaming the pasture lands while tending to his father’s cattle or stick fighting with other boys. “I loved it in the unconditional way that a child loves his first home,” he wrote in his autobiography, “Long Walk to Freedom.”

There are still reminders of that time in Qunu, some of them unusual. Tourists visit a giant rock embedded in a hillside where, Mr. Mandela has said, he slid down the surface so often he hurt his backside.

Mr. Mandela returned to Qunu after his release from prison in 1990, at the end of a 27-year jail term under the apartheid regime, before his election as president in 1994. For years, he visited Qunu at Christmas and on other holidays, staying at his newly built house and donating generously to schools and needy causes. He moved into that house permanently in 2012, but was forced to return to the capital, Pretoria, months later for emergency medical treatment.

In the 1990s, Mr. Mandela used to stroll through the village at dawn, trailed by his bodyguards, chatting with villagers and delighting young children. More recently, he has stayed at home — sometimes coming out to the gate to greet people, villagers said, or receiving guests inside.

But even as his health has declined, his well-known good humor has remained undiminished, several people said. Ayafika Gaxela, a 14-year-old schoolgirl who visited him last year, said they shared a joke together. “He poked fun at my brother,” she recalled with a smile.

The end of apartheid, a system that Mr. Mandela played a central role in dismantling, has brought profound improvements in Qunu, as it has across South Africa. Thanks to government grants and improved pension payments, most houses now have electricity, a decent water supply, outside toilets — and, of course, the right to choose their own government.