Hospital visitors say Nelson Mandela smiled and nodded on his 95th birthday and South Africans celebrated upbeat reports about the former president's health after weeks of worrying that he was on the verge of death.
Children sang "Happy Birthday" at school assemblies nationwide, and many honoured the man known as "the father of the nation" by performing acts of charity for 67 minutes, symbolising Mandela's 67 years of public service. World leaders praised the anti-apartheid leader's life of sacrifice and vision.
Outside the Pretoria hospital where Mandela was admitted for a recurring lung infection, well-wishers paid tribute to him and some received slices of a large birthday cake doled out from inside the compound.
"We don't only recognise him on this day. We put smiles on other people's faces, we donate to other people less fortunate," said Thato Williams, a 13-year-old student at Melpark Primary School in Johannesburg, where 700 students gathered in a hall filled with posters created to honour Mandela's contributions to peace and education.
Mandela remains very fragile, and many details of his medical condition have not been divulged or are tightly controlled by his family and President Jacob Zuma.
The news that his health had improved was another dramatic turn in the life of a man who became a global figure of sacrifice and reconciliation during the fight against white minority rule in South Africa.
"When I visited him today, I found him really stable, and I was able to say, 'Happy Birthday,' and he was able to smile," Zuma said, according to the South African Press Association. His office had recently said Mandela's condition was critical but stable, but a statement said he was steadily improving.
Several months ago, Zuma gave an overly optimistic health assessment, but his remarks were matched by comments from some members of Mandela's family.
Mandela is making "remarkable progress," said one of his daughters, Zindzi, after tense weeks.
Granddaughter Tukwini Mandela said the day was "bittersweet" for the family.
"Obviously we're really grateful for people sending us good wishes and being generally supportive, but, you know, my grandfather is not well, he's in hospital," she added. "We would have preferred him to actually celebrate this day with us out of the hospital, but we are where we are, and we're just keeping our heads up and we're being strong."
Defence Minister Nosiviwe Mapisa-Nqakula, who also visited Mandela, described him as "smiling and alert".
"He opens his eyes and nods, as if to say: 'I'm here with you and appreciate what you're doing,'" she said.
Hospitalised since June 8, Mandela's outlook had seemed increasingly grim until his reported turnaround in recent days. Court documents filed by Mandela's family earlier this month had said Mandela was on life support.
Another Mandela granddaughter, Ndileka Mandela, poured soup for poor children at a charity event and said her family had been unsure about whether her grandfather would live to see his birthday.
"But because of the fighter that he is, he was able to fight a repressive system, and he was able, through God and everybody's prayers, to make it today," she said.
Thursday also marked the 15th wedding anniversary of Mandela and Graca Machel, the former first lady of Mozambique who has spent much of the time at her husband's side during his illness.
As part of his acts of charity, Zuma opened low-cost housing for poor black and white families in the Pretoria area. South Africa is struggling with high unemployment, labour unrest, service delivery shortcomings and other social challenges that have dampened the expectations of a better life for black South Africans after the end of apartheid two decades ago.
Retired Archbishop Desmond Tutu helped paint a school outside Cape Town, saying Mandela makes South Africans "walk tall" and urging compatriots to refrain from divisive behaviour.
Elsewhere, social workers, military commanders and private company employees planted trees, cleaned classrooms and donated food, blankets and other basic necessities in poor areas. Doctors administered eye tests, inoculations and other medical treatments.
At the United Nations, where July 18 was declared Nelson Mandela International Day, former US President Bill Clinton recalled getting to know him while in office. "His heart was so big, and his humanity so great that we often had trouble keeping our official roles apart from our personal friendship," Clinton said.
Indian Prime Minister Manmohan Singh, in a message read at the UN, said "more than a billion Indian hearts rejoice and take pride in the life and mission of Nelson Mandela".
"The outpouring of love and the countless prayers that we have seen in recent days for Nelson Mandela only prove that there is something very deep and abiding in the human spirit that binds us across borders," said the statement, read by Indian UN Ambassador Asoke Kumar Mukerji.
Three astronauts on the International Space Station honoured Mandela in a video message, with astronaut Karen Nyberg calling him "the symbol of what humankind must strive for: peace, brotherhood and a common goal to better every life on this planet".
Visiting Pretoria, European Union President Herman Van Rompuy packed food parcels and said his two sons were fans of Mandela, whom he described as "the brightest sun of South Africa".
Also known by his clan name Madiba, Mandela was jailed for 27 years under apartheid and led a difficult transition to democracy, becoming president in all-race elections in 1994. He served one five-year term, evolving into a global statesman and pursuing charitable causes after that. He retired from public life years ago.
"South Africa is a better place today than it was in 1994 and this is because of the contribution made by Madiba and his collective," the ruling African National Congress, once led by Mandela, said in a statement.
The ANC was the leading liberation movement during apartheid, and has dominated politics since the end of white rule. However, it has come under increasing criticism because of corruption scandals and frustration over poverty and other problems.
In recent months, the ANC and opposition groups have sought to emphasize their connections to Mandela's legacy in the fight for democracy, leading to accusations of political opportunism on both sides.
FW de Klerk, the last president of the apartheid era, said in a statement that Mandela's birthday "should be a time for quiet and respectful contemplation and not for unseemly squabbling over the ownership of Mr. Mandela's heritage".
He continued: "Throughout his life he has been a loyal and stalwart member of the ANC, but I believe that through his example and through his unwavering commitment to national reconciliation all South Africans, regardless of their race or political affiliation, can now proudly call him their own."
De Klerk shared the Nobel Peace Prize with Mandela in 1993 because he effectively negotiated his own government out of power, working on a political transition with Mandela that allayed fears of all-out racial conflict.
Mandela's former wife said she wanted to reassure South Africans who fear the eventual death of Mandela, a unifying figure, would open the way to unrest.
"There are sometimes prophets of doom who say the country will come to a standstill," said Winnie Madikizela-Mandela, herself a prominent figure in the anti-apartheid movement, in an interview with South Africa's Radio 702.
However, she said: "The country will solidify, come together and carry on."
Mandela Day celebrations around the world:
UNITED NATIONS: The UN hosted an informal General Assembly in honour of Mandela which was addressed by former United States President Bill Clinton and co-prisoner and Mandela friend Andrew Mlangeni. UN staff also helped to rebuild homes in Long Island destroyed by Hurricane Sandy.
WASHINGTON: The Congressional Black Caucus celebrated the life and legacy of Mandela at the Emancipation Hall in the US Capitol Visitor Center. House Speaker John Boehner and South Africa's ambassador to the United States Ebrahim Rasool were among guests slated to speak at the ceremony.
NEW YORK: The Tribeca Film Institute partnered with the Nelson Mandela Foundation to commemorate Mandela Day with a video display in Times Square and a meeting in Duffy Square. A picture of a Mandela portrait by South African artist Paul Blomkamp with the words "Happy 95th Birthday Madiba!" was featured on a Times Square monitor throughout the day.
TORONTO: A community celebration featuring live music and family activities was at the Nelson Mandela Park Public School.
PARIS: The South African embassy in Paris hosts its annual Nelson Mandela Day drive to collect clothes, toys and non-perishable food items for charity. The embassy accepts donations until August 31. The Hotel de Ville hosts a free exhibition, "Nelson Mandela: from Prisoner to President," where visitors can learn about Mandela's journey through films, photographs and sculptures. The exhibition will run through July 6.
ROME: An exhibit about Mandela's life at an anti-racism centre was visited by South Africa's ambassador to Italy, Nomatemba Tambo.
INTERNATIONAL SPACE STATION: Three astronauts from the International Space Station honoured Mandela in a video message that included words from Desmond Tutu, the Dalai Lama and Bill and Hillary Clinton, among others.
"Nelson Mandela is the symbol of what humankind must strive for: Peace, brotherhood and a common goal to better every life on this planet. Our work here on the International Space Station mirrors exactly what Mr. Mandela spent his life trying to accomplish," astronaut Karen Nyberg said for the group.