South Africans sang, world leaders openly grieved and cyberspace erupted with Nelson Mandela tributes in a collage of languages as word spread that a man likened to a living saint had died.
Crowds in Johannesburg chanted slogans, lit candles and cried outside the house where the 95-year-old died after a prolonged lung infection.
Mandela will be laid to rest at his ancestral village of Qunu in the Eastern Cape on December 15, President Jacob Zuma said.
A week of national mourning would include an open-air memorial service at Johannesburg's Soccer City stadium - the site of the 2010 World Cup final - on December 10, Zuma said.
The passing of Mandela was at once thoroughly foretold and unexpectedly jarring, as people recalled his graceful leadership through what appeared to be intractable racial crisis in South Africa and his ability to embody hope for moral progress in a beleaguered and often-unjust world.
"We've lost our greatest son. Our nation has lost its greatest son. Our people have lost a father," South African President Jacob Zuma said in a televised address that aired around the world. "Although we knew that this day would come, nothing can diminish our sense of a profound and enduring loss."
Tributes began flooding in almost immediately for a man who was an iconic global symbol of struggle against injustice and of racial reconciliation.
The man himself - president, Nobel laureate, inspiration to oppressed people worldwide - was always more complex than his super-heroic public image, as embodied in statues erected in so many capitals. He was long regarded as a terrorist by South Africa's government and its allies, and he openly embraced armed resistance as a revolutionary necessity before spending 27 years in prison.
But the Mandela being remembered was more the leader who walked free in 1990, forgave his captors and peacefully navigated his nation through what most observers - inside and outside South Africa - expected would be a civil war. The reality of multi-racial democracy has proved harder and far less equal than many expected when it arrived in 1994, but love for Mandela has never dimmed.
He was elected president in landmark all-race elections in 1994 and retired in 1999.
President Barack Obama, who like Mandela was his country's first black president, said: "Today he's gone home, and we've lost one of the most influential, courageous and profoundly good human beings that any of us will share time with on this Earth. He no longer belongs to us; he belongs to the ages."
British Prime Minister David Cameron called Mandela "a hero of our time" and said "a great light has gone out in the world".
"Nelson Mandela was an inspirational leader, and a remarkable man.
"On behalf of the New Zealand people and the Government, I would like to express my sincere condolences to both his family and all South Africans," he said.
"For years he symbolised South Africa's hope for a future free from apartheid.
"Mr Mandela was a force for change, not only in South Africa, but around the world."
Mandela's death comes amid reminders of his many sacrifices, depicted in Mandela: Long Walk to Freedom, a biopic based on his best-selling autobiography. Britain's Prince William was attending the London premiere of the movie as the news spread across the world. "We were just reminded of what an extraordinary and inspiring man Nelson Mandela was," the tuxedo-clad prince said.
Former California governor Arnold Schwarzenegger, issuing one of the countless statements prepared by politicians during Mandela's months of declining health, said: "President Mandela's life is the closest thing we have to proof of God."
In South Africa, where Mandela was affectionately known by his traditional clan name Madiba, the mood was somber after President Jacob Zuma announced the death on national television.
"Fellow South Africans, our beloved Nelson Rolihlahla Mandela, the founding president of our democratic nation, has departed," Zuma said in the nationally televised address.
"Our people have lost a father. Although we knew this day was going to come, nothing can diminish our sense of a profound and enduring loss. His tireless struggle for freedom earned him the respect of the world. His humility, passion and humanity, earned him their love," he added.
Crowds thronged Mandela's former home in Soweto, the sprawling township outside of Johannesburg that was the scene of some of the worst violence during the apartheid struggle but has grown into an increasingly middle-class bedroom community.
Longtime newscaster Mathatha Tsedu said on a national news channel: "This is a man who had no unfulfilled missions."
In the United States, activists on both sides of the mass apartheid protests of the 1980s paid homage to the movement's symbol of resistance. At a time when campus sit-ins rocked to the anthem Free Nelson Mandela, then-State Department official Chester Crocker was pushing President Ronald Reagan's "constructive engagement" with the country's white minority as an alternative to cutting financial ties. On Thursday, he remembered Mandela as "tough as nails, highly principled and committed to reconciliation".
"I've respected him for many, many years," said Crocker, who recalled receiving a phone call from Mandela during a later visit to South Africa. Mandela wanted a copy of Crocker's book and asked him to deliver it personally. "This was a person with an enormous, really winning human touch. He understood that he had the special capacity to help the last generation of [white] leaders to escape the political and mental prison they were trapped in."
'GIANT FOR JUSTICE'
Mandela would receive a full state funeral, Zuma said, ordering flags to be flown at half mast.
In New Zealand, flags on all Government department buildings were being lowered to half mast today. They would also fly at half mast on the day of Mandela's funeral.
A spokesman for Prime Minister John Key's office said it was a gesture that was usually only reserved for heads of state, and would normally only happen on the day of their funeral.
The UN Security Council was in session when the ambassadors received the news of Mandela's death. They stopped their meeting and stood for a minute's silence.
"Nelson Mandela was a giant for justice and a down-to-earth human inspiration," UN Secretary-General Ban Ki-moon told reporters. "Nelson Mandela showed what is possible for our world and within each one of us if we believe, dream and work together for justice and humanity."
In 1999, Mandela handed over power to younger leaders better equipped to manage a modern economy - a rare voluntary departure from power cited as an example to African leaders.
In retirement, he shifted his energies to battling South Africa's AIDS crisis, a struggle that became personal when he lost his only surviving son to the disease in 2005.
Mandela's last major appearance on the global stage came in 2010 when he attended the championship match of the soccer World Cup, where he received a thunderous ovation from the 90,000 at the stadium in Soweto, the neighbourhood in which he cut his teeth as a resistance leader.
Charged with capital offences in the infamous 1963 Rivonia Trial, his statement from the dock was his political testimony.
"During my lifetime I have dedicated myself to this struggle of the African people. I have fought against white domination, and I have fought against black domination."
- Staff reporters and agencies