FORMER South African president Nelson Mandela has died, it has been confirmed.

The country's president, Jacob Zuma, made the announcement about the 95-year-old tonight.

In a televised address, Mr Zuma said: "Our nation has lost its greatest son. Our people have lost a father.

"What made Nelson Mandela great was precisely what made him human. We saw in him what we seek in ourselves."

David Cameron tweeted his condolences, adding: " A great light has gone out in the world. Nelson Mandela was a hero of our time. I've asked for the flag at No10 to be flown at half mast."

US President Barack Obama said: "He was a man who took history in his own hands."

President Zuma said Mr Mandela died peacefully in the company of his family at his Johannesburg home at 8.50pm local time. He was 95.

Mr Mandela had been in a critical condition for several months after fighting a series of lung infections.

Hopes were raised when he left a Pretoria hospital on September 11.

But earlier this week Mr Mandela's eldest daughter said her father was on his "deathbed" and last night his family gathered at his bedside.

Prime Minister David Cameron said: "A great light has gone out in our world.

Nelson Mandela was a hero of our time. I’ve asked for the flag at No10 to be flown at half mast."

Mr Mandela spent 27 years in prison after being found guilty of sabotage and conspiracy to overthrow the South African government.

During his imprisonment he became a global figurehead for racial integration. He rejected offers of freedom with strings attached arguing that only a free man could negotiate.

Mr Mandela was released by President FW de Klerk on Sunday February 11 1990, sometime after the then president had lifted the ban on the African National Congress.

Four years later, on May 10 1994, he became the first democratically-elected president of South Africa, a post he held until June 1999, when he formally retired from public life.

By then Nelson Mandela had transcended his position as president of South Africa to become the world's elder statesman.

After stepping down in 1999, he spent much of his time travelling the world, meeting foreign statesmen and being hailed, wherever he went, as a remarkable man who never demonstrated even a trace of rancour and vindictiveness towards those who threw him into prison.

Mr Zuma paid tribute to "our beloved Madiba" saying the nation had lost "its greatest son", adding ‘"he is now resting. He is now at peace."

In a cruel irony, his death was announced as the Duke and Duchess of Cambridge will attend the European premiere of the highly anticipated film Mandela: Long Walk To Freedom which depicts his life from childhood through to his inauguration as the first democratically-elected president of South Africa.

Nelson Rolihlahla Mandela was born on July 18 1918 in a village near Umtata in the Transkei. He was given the name Nelson by a teacher at his school.

His father, a counsellor to the Thembu royal family, died when he was nine, and he was placed in the care of the acting regent of the Thembu people.

He joined the African National Congress in 1943, first as an activist, then as the founder and president of the ANC Youth League.

He qualified as a lawyer and, in 1952, opened a law practice in Johannesburg with his partner, Oliver Tambo.

Together, Mr Mandela and Mr Tambo campaigned against apartheid. But in 1956, Mr Mandela was charged with high treason, along with 155 other activists. The charges against him were dropped after a four-year trial.

The resistance to apartheid grew, mainly against the new pass laws, which dictated where blacks were allowed to live and work.

In 1958, he married Winnie Madikizela, who later played an active role, both politically and in the campaign - which eventually became worldwide - to free her husband from prison.

Two years later, the ANC was outlawed and Mr Mandela went underground. Tension with the apologists for apartheid soared to new heights when, in 1960, 69 black people were shot dead by police in the Sharpeville massacre.

This signalled the end of peaceful resistance. Mr Mandela, who was already by then national vice-president of the ANC, launched a campaign of sabotage against the South African economy.

With the banning of the ANC, he was detained until 1961 when he went underground to lead a campaign for a new national convention. The same year the ANC set up a military wing - Umkhonto we Sizwe (MK) - which began a campaign against the Government and economic installations.

In 1962, Mr Mandela was arrested after returning from a military training camp in Algeria. He conducted his own defence and, to the fury of the government, used the trail to convey his beliefs about equality, democracy and freedom to the world.

He said: ‘‘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.’’

Mr Mandela, however, was convicted and jailed for five years. But that wasn’t long enough for the South African government. In 1964, while still in prison, he was charged with sabotage and sentenced to life imprisonment.

He remained behind bars on the notorious Robben Island for 18 years before being transferred to Polismoor Prison on the mainland in 1982.

In prison, Mr Mandela never compromised his political principles. He rejected president PW Botha’s offer of freedom if he renounced violence.

In 1980, Oliver Tambo, who was in exile, launched an international campaign for his release which saw the international community tightened the sanctions first imposed on South Africa in 1967 against the apartheid regime.

Amid escalating civil unrest, in 1990 South African President FW de Klerk ordered Mr Mandela’s released.

Within days, the ANC and the National Party began talks about forming a new multi-racial democracy for South Africa.

However, violent clashes broke out between supporters of the Inkatha Freedom Party, a Zulu group led by Chief Buthelezi and ANC supporters.

Despite attempts to resolve the problems through talks, the violence escalated and the Inkatha targeted ANC strongholds with support from the white police force.

Relations grew tense as the violence persisted, but the two leaders - President de Klerk and Mr Mandela - met sporadically in an attempt to stop the bloodshed.

In December 1993, Mr Mandela and Mr de Klerk were awarded the Nobel Peace Prize. Mr Mandela said it was an accolade to all people who had worked for peace and stood against racism.

Five months later, for the first time in South Africa’s history, all races voted in democratic elections. Mr Mandela was elected President, in scenes of joy, with the ANC winning 252 of the 400 seats in the national assembly.

Mr Mandela gave up the presidency of the ANC in December 1997 in favour of his deputy, Thabo Mbeki. He stepped down as president of the country after the ANC’s landslide victory in the summer of 1999, again for Mr Mbeki.

Even in ‘‘retirement’’, Mr Mandela did not remain silent. He accused the United Kingdom and the United States of encouraging international chaos by ignoring other countries and assuming the role of ‘‘policemen of the world’’.

He also openly criticised Washington and London for taking military action in Iraq and Kosovo without seeking permission from the United Nations Security Council.

But as the years progressed, his ailing health saw him retreat from public life.

In 2008, he made a rare visit to the UK to attend a concert marking his 90th birthday.

The following year, the United Nations declared July 18 Mandela Day, in recognition of his birthday.

But a family bereavement and increased fragility meant that he maintained a low profile at football’s World Cup 2010 in South Africa, only briefly appearing at the finale.

In January 2011, Mr Mandela spent two nights in a Johannesburg hospital for what his doctor said was a respiratory infection.

Officials said his office received more than 10,000 letters of good wishes, including from US President Barack Obama.

In November 2011 the Prince of Wales and the Duchess of Cornwall inquired about Mr Mandela’s state of health, while they were visiting South Africa.

They were told that the 93-year-old was ‘‘fine, happy and peaceful and enjoying life’’ at his birthplace in rural Qunu in the Eastern Cape.

Later that month an increasingly fragile Mr Mandela hit the headlines again, this time when he spent a night in hospital for a long-standing abdominal complaint.

Last year he spent Christmas Day in hospital with his wife and family members at his bedside during his three-week stay.

He was again admitted to hospital in Pretoria in March this year, and on April 6 he was discharged from a hospital after treatment for pneumonia, which included a procedure in which doctors drained fluid from his lung area.

On June 8 he was admitted to hospital again with a recurrence of his lung infection, and in recent weeks his health deteriorated.

Mr Zuma said on June 23 that Mr Mandela’s health had deteriorated and he was in a ‘‘critical condition’’.

Last night Mr Zuma said: ‘‘Although we knew that this day would come, nothing can diminish our sense of a profound and enduring loss.

‘‘His tireless struggle for freedom earned him the respect of the world.

‘‘His humility, his compassion, and his humanity earned him their love. Our thoughts and prayers are with the Mandela family. To them we owe a debt of gratitude.

‘‘They have sacrificed much and endured much so that our people could be free."

US President Barack Obama said: "He no longer belongs to us. He belongs to the ages. "