Nelson Mandela, South Africa's anti-apartheid leader and first black president, died Thursday at the age of 95.
South African President Jacob Zuma said in a nationally televised address Mr. Mandela had "passed on peacefully" in the company of his family.
Mr. Zuma said South Africa has lost "its greatest son." He said Mr. Mandela will be given a state funeral and national flags will be flown at half staff.
After the announcement late Thursday, crowds gathered outside Mr. Mandela's Johannesburg home to sing and dance, paying their respects in the South African tradition.
Mr. Mandela spent nearly three decades in prison for his role in fighting to end white minority rule and official discrimination against blacks in South Africa.
After his release, he emerged as a revered symbol of peace and reconciliation and won the Nobel Peace Prize in 1993. The following year, he became South Africa's first black president.
Mr. Mandela, who contracted tuberculosis during his nearly three decades of incarceration, was hospitalized repeatedly during the past several years, most recently for a recurring lung infection.
The African National Congress, which Mr. Mandela joined in 1943 and whose youth league he co-founded, said in a statement South Africa had lost "a colossus and epitome of humility, equality, justice and peace."
Mr. Mandela served as the ANC's president from 1991 to 1997. He was South Africa's president from 1994 until he retired from public life in 1999.