Nelson Mandela, the icon of South Africa's anti-apartheid struggle and a colossus of 20th century politics, has died aged 95, prompting mass mourning and a global celebration of his life.
The Nobel Peace laureate, who was elected South Africa's first black president after spending nearly three decades in jail, died at his Johannesburg home late on Thursday surrounded by his family, after a long battle against a lung infection.
The news was announced to the nation and the world by an emotional South African President Jacob Zuma, in a live late-night broadcast.
"Our beloved Nelson Rolihlahla Mandela, the founding president of our democratic nation, has departed," said Zuma, whose own role in the struggle against white rule saw him imprisoned with Mandela on Robben Island.
"Our nation has lost its greatest son. Our people have lost a father."
As the sun came up on Friday, hundreds of South Africans maintained an impromptu vigil outside the Mandela home in Johannesburg, ululating, waving flags and singing anti-apartheid era songs.
"I did not come hear to mourn. We are celebrating the life of a great man. A great unifier," said Bobby Damon, who lives just a few streets away from Mandela's house.
"But I must admit though, the news came as a shock," he added. "There will never be another Mandela in our lifetime."
Zuma announced Mandela will receive a full state funeral and he ordered flags to remain at half-mast until after the burial. National flags were also lowered in countries including the US and France.
State broadcaster SABC later said Mandela's body had been moved to a military hospital in Pretoria.
Mandela's body will lie in state for three days in Pretoria, the BBC said, before a funeral is held on Saturday in Qunu, the village in Eastern Cape where he was born.
Barack Obama, America's first black president, paid tribute to a man who "took history in his hands and bent the arc of the moral universe towards justice".
Obama was joined in mourning by a roll call of figures from across the worlds of politics, business and sport, reflecting how much Mandela had touched hearts as a rallying point for justice and good causes after he drew a "Rainbow Nation" out of his diverse homeland.
His death had long been expected, coming after a spate of hospitalisations with lung infections and three months of intensive care at home. But the announcement came as a shock nonetheless.
Mandela's two youngest daughters were in London watching the premiere of his biopic Long Walk to Freedom when they were told of his death.
Archbishop emeritus Desmond Tutu lauded his fellow Nobel laureate as the man who taught a deeply divided nation how to come together.
"To suggest that South Africa might go up in flames - as some have predicted - is to discredit South Africans and Madiba's legacy," Tutu said in a statement.
"The sun will rise tomorrow.... It may not appear as bright as yesterday, but life will carry on."
Once considered a terrorist by the US and Britain for his support of violence against the apartheid regime, at the time of his death he was an almost unimpeachable moral icon.
Mandela's extraordinary life story, quirky sense of humour and lack of bitterness towards his former oppressors ensured global appeal for the charismatic leader.
He spent 27 years behind bars before being freed in 1990 to lead the African National Congress (ANC) in negotiations with the white minority rulers which culminated in the first multi-racial elections in 1994.
A victorious Mandela served a single term as president before taking up a new role as a roving elder statesman and leading AIDS campaigner before finally retiring from public life in 2004.
The man he replaced, South Africa's last white president FW de Klerk, also paid tribute.
"South Africa has lost one of its founding fathers and one of its greatest sons," he said.