Mandela had been hospitalized in Pretoria since June 8 to be treated for what the government said was a recurring lung infection. He had struggled with respiratory problems that had bothered him since he contracted tuberculosis in prison.
South African President Jacob Zuma announced Mandela's death at a news conference Thursday. "We've lost our greatest son," he said.
"Our people have lost a father," Zuma said. "Although we knew that this day would come, nothing can diminish our sense of a profound and enduring loss."
"He no longer belongs to us; he belongs to the ages," said President Barack Obama at a news conference Thursday afternoon. "God bless his memory and keep him in peace." The White House said Obama will attend a memorial for Mandela in South Africa.
Mandela's two youngest daughters were attending the premiere of a new film about the leader called "Mandela: Long Walk to Freedom" in London when the news of his death was announced. The daughters asked for the premiere to continue as they left.
Born in 1918, Mandela was the son of a tribal chief. As a young man, he faced the daily humiliation of living under apartheid, a system of government-enforced racial division that led to the oppression of the majority, black South Africans.
Mandela made the fight for his country and people's liberation. But in 1964, he paid the price with his own freedom, sentenced to life in prison.
With Mandela in chains, South Africans found a new rallying cry. "Free Mandela!" became synonymous with demands for a free South Africa.
After nearly three decades, President F. W. de Klerk finally released Mandela. He was embraced by his people and the world. Mandela became a Nobel Peace Prize recipient and, in the fruition of a political dream, was elected president in the country's first free election. The post-apartheid years were rife with unemployment, and AIDS plagued the country.
"South Africa has lost one of its founding fathers and one of its greatest sons," said de Klerk in a statement Thursday.
Mandela shared the 1993 Nobel Peace Prize with de Klerk, the country's last white president.
Mandela visited Los Angeles in 1990 during a 12-day trip to the United States, and again in 2000.
"He proved that there is freedom in forgiving, that a big heart is better than a closed mind, and that life's real victories must be shared," said former President Bill Clinton in a statement Thursday.
A triumph was the 2010 World Cup, played in South Africa. The event's emotional climax came when a 91-year-old Mandela, who had fought for years to host the cup, appeared on the pitch. That was his last public appearance. He attended the final match and the closing ceremonies.
In his later years, Mandela battled illness and was in and out of the hospital. He eventually moved to his home village to be closer to family. Still, his influence never waned, even at home hosting a number of visitors, including first lady Michelle Obama and daughters Sasha and Malia. President Obama met Mandela in 2005 when Obama was still a senator. Former Secretary of State Hillary Rodham Clinton visited Mandela in August 2012.
Mandela became a living symbol of freedom and the strength of the human spirit in South Africa and beyond.
"During my lifetime I have dedicated myself to this struggle of the African people," Mandela said. "I have fought against white domination, and I have fought against black domination. I have cherished the ideal of a democratic and free society in which all persons live together in harmony and with equal opportunities. It is an ideal which I hope to live for and to achieve. But if needs be, it is an ideal for which I am prepared to die."
Mandela is survived by his third wife, Graca Machel; his daughter Makaziwe by his first marriage, and daughters Zindzi and Zenani by his second.
ABC News and The Associated Press contributed to this report.