South Africa’s “greatest son” and one of the most beloved leaders of the 20th century, Nelson Mandela, died Thursday at the age of 95.

A sombre South African President Jacob Zuma announced Mandela’s death in a television address.

“Our nation has lost its greatest son. Our people have lost a father. Although we knew that this day would come, nothing can diminish our sense of a profound and enduring loss,” Zuma said.

“His tireless struggle for freedom earned him the respect of the world. His humility, his compassion and his humanity earned him their love.”

Zuma said he has ordered all flags in South Africa to be lowered to half-mast, where they will remain until after what will be a state funeral.

In an address to reporters at the UN, Secretary-General Ban Ki-moon offered his condolences to Mandela’s family, and recalled being overwhelmed by Mandela’s “selflessness and his deep sense of shared purpose” when they met in 2009.

“Let us continue each day to be inspired by Nelson Mandela’s lifelong example to keep working toward a better and more just world,” he said.

At the White House, U.S. President Barack Obama said he “cannot fully imagine” his life without the example set by Mandela.

“He achieved more than could be expected of any man,” Obama said. “Today he’s gone home. 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.”

In a written statement, Prime Minister Stephen Harper said “the world has lost one of its greatest moral leaders and statesmen.”

“Nelson Mandela’s enduring legacy for his country, and the world, is the example he set through his own ‘long walk to freedom,’” Harper said. “With grace and humility, he modelled how peoples can transform their own times and in doing so, their own lives.”

British Prime Minister David Cameron tweeted that “a great light has gone out in the world. Nelson Mandela was a hero of our time.”

Cameron said the flag at 10 Downing Street will be lowered to half-mast.

Mandela, who inherited a country on the verge of civil war and torn apart by racial violence, will forever be remembered for bringing hope and reconciliation to South Africa. Controversial for much of his life, he ultimately became a beacon of optimism for people both at home and around the world.

The iconic leader -- known for his charismatic personality, soft-yet-stirring speeches and charitable work post-politics -- spent 27 years behind bars for opposing white rule in his country before becoming South Africa’s first black president in 1994.

Mandela became increasingly frail in recent years and was hospitalized several times in the past few months, receiving treatment for pneumonia, an ongoing lung infection and gallstones.

Though he served only five years in office, Mandela is recognized the world over, often seen as someone with great dignity and moral authority.

Read more about Nelson Mandela's monumental life:

While he sought a quiet family life in retirement, he continued to meet with notable dignitaries and celebrities, weigh in on international affairs and conflicts, and champion causes in which he believed, including poverty and HIV/AIDS.

The Nelson Mandela Foundation released a statement Thursday to say that “No words can adequately describe this enormous loss to our nation and to the world.

“We give thanks for his life, his leadership, his devotion to humanity and humanitarian causes. We salute our friend, colleague and comrade and thank him for his sacrifices for our freedom.”

At age 85 and amid failing health, he was forced to announce he was “retiring from retirement,” in 2004, retreating from the spotlight as much as possible. His last major public appearance was in 2010, when South Africa hosted the World Cup of Soccer. He was greeted by thunderous applause but made no speech.

Known for his unyielding optimism, Mandela leaves behind a lasting legacy -- with countless parks, schools and squares named in his honour.

His birthday is a public holiday in South Africa, where Mandela is affectionately known by his clan name, Madiba.

Mandela’s life behind bars, in power

Mandela was born on July 18, 1918, when South Africa was still largely under colonial rule, and became a political force when he was just a young man. He was expelled from the University of Fort Hare in 1940 for organizing a student strike, and joined the African National Congress two years later.

After years of activism, and after founding South Africa’s first black law partnership, Mandela helped found Umkhonto we Sizwe, the ANC’s guerilla wing, a move he says he made only after “a sober assessment of the political situation that had arisen after years of tyranny, exploitation and oppression of my people by whites.”

On June 12, 1964, Mandela was sentenced to life in prison after being convicted of trying to overthrow South Africa’s apartheid government.

He served 27 years of hard labour, mostly at Robben Island, looking forward to his only perk -- a 30-minute session with a visitor once a year.

But while in jail, Mandela unified his fellow prisoners, foreshadowing the leadership skills he would use when he became the country’s first fully-representative democratically elected president.

His release on Feb. 11, 1990 was brought about in part by heavy economic sanctions imposed on South Africa by dozens of countries, including Canada.

As the world watched on television, Mandela walked confidently toward the prison gates, his then-wife Winnie at his side. A huge throng of reporters and thousands of supporters wait to greet him, a scene he later described as "a happy, if slightly disorienting chaos."

His next gesture would forever symbolize his struggle.

"I raised my right fist and there was a roar," Mandela recalled.

In 1993, Mandela and South African President F.W. de Klerk were awarded the Nobel Peace Prize for their work to end apartheid. Mandela was inaugurated as president the following year.

Mandela is survived by his wife, Graca Machel, and his three surviving children.