David Cameron led tributes to South Africa's first black president Nelson Mandela tonight, saying "a great light has gone out in the world".
The flag at No 10 will be flown at half-mast in honour of the former leader, who was a "hero of our time", the Prime Minister said.
Taking to Twitter, he wrote: " 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."
Shadow Chancellor Ed Balls wrote: " Seeing Nelson Mandela walking free is one of the great moments of my life - proving leadership and hope can triumph. Thank-you. RIP"
Baroness (Betty) Boothroyd, the former Commons speaker, fondly recalled the memories about a visit President Mandela made in 1996.
She said: "I welcomed many leaders to Westminster when I was Speaker but he was by far the most remarkable.
"His speech to the joint Houses of Parliament in Westminster Hall in 1996 was a masterpiece of reconciliation after the bitter years of apartheid. He represented 'an outstanding victory of the human spirit over evil', I told him.
"He wrote to me afterwards of his delight at the pomp and ceremony of the occasion and its 'majesty and dignity'.
"H e was especially touched by the Queen's graciousness towards him and the warmth of the British people.
"He was kind enough to add 'It is friends like yourself who have contributed to making our country the democratic rainbow nation we are today'.
"His modesty during that visit was extraordinary and people loved him all the more because of it. One anecdote illustrates his foresight. On his arrival at the entrance to the Commons, I cautioned him about the treacherous steps in Westminster Hall and said we would take them at his pace.
"'Don't worry', he replied. 'I came to look at them at six o'clock this morning'. With that, the trumpets sounded, he took my hand and we entered together without mishap. He had foreseen the difficulty and worked out the solution hours before.
"He was still looking forward when we last met in South Africa when I went there as Chancellor of the Open University. he said that when he finally entered the pearly gates he would join the local branch of the African National Congress."
Irish Taoiseach Enda Kenny described Mr Mandela's death as "a great light extinguished".
"The name Mandela stirred our conscience and our hearts. It became synonymous with the pursuit of dignity and freedom across the globe," Mr Kenny said.
The Taoiseach said Mr Mandela changed life in South Africa, and humanity.
"As we mark his passing, we give thanks for the gift of Nelson Mandela. We ask that his spirit continues to inspire, guide and enlighten us as we strive to bring freedom and dignity to the family of man, our brothers and sisters, across the world," he said.
"I offer my deepest sympathies, on behalf of the Irish Government and people, to his family, to his friends and supporters, and to the Government and the people of South Africa."
Former prime minister Tony Blair said the political leader was a "great man" who had made racism "not just immoral but stupid".
"He was a unique political figure at a unique moment in history," he said.
" Through his leadership, he guided the world into a new era of politics in which black and white, developing and developed, north and south, despite all the huge differences in wealth and opportunity, stood for the first time together on equal terms.
" Through his dignity, grace and the quality of his forgiveness, he made racism everywhere not just immoral but stupid; something not only to be disagreed with, but to be despised. In its place he put the inalienable right of all humankind to be free and to be equal.
"I worked with him closely, and remember well his visits to Downing Street. He was a wonderful man to be around, with a sharp wit, extraordinary political savvy and a lovely way of charming everyone in a building.
"He would delight in making sure that the person on the door or serving the tea would feel at home with him and be greeted by him with the same kindness and respect he would show a leader. So the warmth of his personality was equal to the magnitude of his contribution to the world.
"He was a great man, a great leader and the world's most powerful symbol of reconciliation, hope and progress."
Labour leader Ed Miliband said: " The world has lost the global hero of our age. Nelson Mandela showed us the true meaning of courage, hope, and reconciliation."
In a more detailed statement put out by Downing Street, Mr Cameron said: "A great light has gone out in the world. Nelson Mandela was a towering figure in our time; a legend in life and now in death - a true global hero.
"Across the country he loved they will be mourning a man who was the embodiment of grace.
"Meeting him was one of the great honours of my life. My heart goes out to his family - and to all in South Africa and around the world whose lives were changed through his courage."
Christian Aid chief executive Loretta Minghella described Mandela as a "man whose strength of vision founded a nation".
"The sufferings and injustices inflicted by apartheid could so easily have led to a reckoning in blood when majority rule was introduced," said Ms Minghella.
"The fact that South Africa's transition from pariah state to independent nation took place in relative peace was largely down to the magnanimity and moral courage of Mr Mandela.
"His readiness to eschew revenge after 27 years in prison was an example to all. His calm and restraint showed the people, not just of South Africa but the world, that justice and tolerance can prevail over fear and oppression.
"He was that rare creature, a person of immense power who used his energies and influence for the good of all. He will be sorely missed."
World Bank Group president Jim Yong Kim said: " We are deeply saddened to learn of the death of Nelson Rolihlahla Mandela. On behalf of the World Bank Group staff, I convey my deepest sympathies to Graca Machel, Nelson Mandela's family, and the South African people.
"The world has lost a man who brought a rainbow of possibilities to a country that was segregated into black and white.
"But his gifts to humankind remain with us. He taught the world that no matter the sins of the past, no matter the horror of apartheid, the way ahead toward peace was to forgive but not forget, to remember what happened but also to offer a hand in order to start anew.
"We are humbled by his leadership. We are inspired by his commitment to reconciliation. He showed us that fundamental change is possible and must be pursued when the freedom and well-being of people are at stake.
"On this sad day, our thoughts are with the South African people."
In a statement released through NBC News, former US president George W Bush said: " President Mandela was one of the great forces for freedom and equality of our time.
"He bore his burdens with dignity and grace, and our world is better off because of his example.
"This good man will be missed, but his contributions will live on forever. Laura and I send our heartfelt sympathy to President Mandela's family and to the citizens of the nation he loved."
US president Barack Obama said the world has lost an influential, courageous and "profoundly good" man.
Mr Obama said Mandela "no longer belongs to us. He belongs to the ages."
Speaking from the White House, Mr Obama said he was one of the countless millions around the world who was influenced by Mandela.
He met Mr Mandela's family earlier this year when he visited South Africa. But he did not meet the ailing leader, who was in hospital throughout his visit.
The Archbishop of Canterbury, the Most Rev Justin Welby, said: " The death of President Nelson Mandela was announced in memorable words by President Zuma.
"South Africa has lost its greatest citizen and its father.
"Nelson Mandela, fighting to the end, is freed to be with his God in joy and reward for his great service and sacrifice.
"We pray for his family, for his friends and for his country.
"We are challenged to show the same degree of humanity, of courage and of generosity."
Former prime minister Gordon Brown said: "Nelson Mandela was the greatest leader of our generation. A leader of magnanimity, fortitude, unshakeable optimism and most of all, the most courageous man I ever met.
"True courage requires not only strength of will but strength of belief. What motivated Nelson Mandela and drove him to risk his life for freedom was a burning passion that irrespective of colour, race and background, all people are created equal - and his list of historic achievements starts with a multiracial South Africa.
"Every accolade in the world was awarded to him but the one he prized most was Children's Champion. As he said in his book, he had climbed one mountain, but there is another still to climb - dignity for every child.
"He was the greatest of Africans. He had greatness as vast as the continent he loved. He had within him the greatness of the human soul. And for me, he was a good and great friend. With Graca, his beloved wife and his family we all today mourn his death, but we celebrate the greatness of his life."
In a fuller statement Mr Miliband said: "The world has lost the inspirational figure of our age.
"Nelson Mandela taught people across the globe the true meaning of courage, strength, hope and reconciliation.
"From campaigner to prisoner to president to global hero, Nelson Mandela will always be remembered for his dignity, integrity and his values of equality and justice.
"He was an activist who became president and a president who always remained an activist. Right to the end of his life he reminded the richest nations of the world of their responsibilities to the poorest.
"Above all, he showed us the power of people, in the cause of justice, to overcome the mightiest obstacles.
"He moved the world and the world will miss him deeply.
"During the struggle against apartheid, the Labour Party was proud to stand with the people of South Africa in solidarity. Today we stand with the people of South Africa in mourning."
Mr Obama added that the former South African leader represented the fight for freedom and dignity throughout the world.
He said: "Madiba transformed South Africa and moved all of us. His journey from a prisoner to a president embodied the promise that human beings and countries can change for the better.
"His commitment to transfer power and reconcile with those who jailed him set an example all humanity should aspire to, whether in the lives of nations all our own personal ones."
"He achieved more than can be expected of any one man."
He added: " I cannot imagine my own life without Mandela's example and so long as I live, I will do what I can to learn from him."
Deputy Prime Minister Nick Clegg said: "Our thoughts go out to the people of South Africa who will be left heartbroken by this sad news.
"Every so often history produces an individual whose message is universal, and Nelson Mandela will be mourned and missed on every continent around the globe. The hope he offered was enough to unite races. It bridged cultures and transcended generations and it could heal the deepest divides.
"That hope must now live on. Nelson Mandela's legacy will continue to burn brightly, there is little doubt about that. But our greatest tribute to him will be our commitment to equality, humanity and peace - the values for which he very literally put his life on the line."
UN secretary-general Ban Ki-moon said Nelson Mandela was "a giant for justice" whose "selfless struggle for human dignity, equality and freedom" inspired many people around the world.
"No one did more in our time to advance the values and aspirations of the United Nations," he said.
"Nelson Mandela showed what is possible for our world, and within each one of us, if we believe a dream and work together for justice and humanity. Let us continue each day to be inspired by Nelson Mandela's lifelong example to keep working for a better and more just world."
The UN Security Council interrupted a meeting on the tribunals for former Yugoslavia and Rwanda and stood for a minute in silent tribute to Mandela.
London mayor Boris Johnson said: "When the definitive history of our time is written, the name Mandela will stand taller than most - perhaps tallest of them all.
"Nelson Mandela understood the most powerful tool at his disposal was the power of forgiveness. He faced down the tyranny and oppression of apartheid by embracing unity, by rejecting division, by proving without rancour or recrimination that his way was the right way, the best way, and the only way to bring about change.
"Londoners, brought up in a city where the values of diversity and equality were celebrated not suppressed, forged a unique bond with Mandela and the struggle he embodied.
"He was without doubt the pre-eminent statesman of his age. No statesman in history can match him for resilience, for grace, and for forgiveness.
"A great heart is stilled."