Nelson Mandela has "passed on peacefully" aged 95.
The anti-Apartheid hero passed away in his Johannesburg home on 5 December "surrounded by close family".
He had been suffering from a recurrent lung infection.
His body will be moved to a mortuary in Pretoria. A state funeral is likely to take place on Saturday 14 December.
In a statement South African president Jacob Zuma described his passing as a "moment of our deepest sorrow".
"He is now resting, he is now at peace," the president said in a speech. "Our nation has lost its greatest son, our people has lost their father.
"Although we knew that this day would come nothing can diminish our sense of a profound and enduring loss."
The country's first black president, who spent 27 years in jail, was admitted to hospital for three months in the summer and returned to his family home in a leafy Johannesburg suburb for his final months.
Mr Mandela is survived by his wife Graça Machel, three daughters Makaziwe, Zenani and Zindzi, as well as 20 grandchildren.
One of his final appearances on the world stage came during celebrations for his 90th birthday in 2008. He told a rapturous crowd in London's Hyde Park: "We say tonight, after nearly 90 years of life, it is time for new hands to lift the burdens. It is in your hands."
He was rarely seen in public again.
He did venture out for the closing ceremony for the FIFA World Cup in 2010 hosted by South Africa. The occasion provided more evidence of his indomitable will since his great-granddaughter was killed by a drunk driver on the way home after the opening ceremony.
The following year he made time to welcome Michelle Obama and her daughters to his country, looking in good spirits during their audience. Twelve months later, the statesmen met with Bill Clinton, who spoke of his continuing zest for life.
Now, one of the greatest warriors for justice the world has ever known has been silenced forever.
The life and times of Nelson Mandela
•1918: Born into the Xhosa-speaking Thembu people
•1927: His father died; the politician later said he inherited his "proud rebelliousness"
•1941: Fled arranged marriage organised by his guardian
•1943: Joined African National Congress
•1943: Studied law at Witswaterand University
•1944: Married Evelyn Ntoko Mase; they had four children
•2013: Founded country's first all black law practice
•1956: Charged with high treason, but charges dropped
•1957: Marriage with Evelyn ended over his political commitment
•1958: Married Winnie Madikizela; couple had two daughters
•1962: Arrested, convicted of sabotage sentenced to five years
•1964: Charged again sentenced to life
•1990: Freed from prison
•1993: Wins Nobel Peace Prize
•1994: Becomes South Africa's first black president
•1996: Divorces Winnie
•1998: Marries Graca Machel
•1999: Steps down from presidency
•2004: Retires from public life
•2005: Announces his son has died from HIV/Aids-related illnesses
•2013: Dies aged 95