People around the world have been reacting to the news that South Africa's first black president and anti-apartheid icon Nelson Mandela has died, aged 95.
South African President Jacob Zuma announced Nelson Mandela's death, saying South Africa had lost "its greatest son" and calling on South Africans to conduct themselves with the "dignity and respect" that Mr Mandela personified.
"Although we knew this day was going to come, nothing can diminish our sense of a profound and enduring loss," he said.
US President Barack Obama spoke shortly afterwards. "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 said.
"Through his fierce dignity and unbending will to sacrifice his own freedom for the freedom of others, 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."
Russian President Vladimir Putin said: "Mandela, having gone through the most difficult ordeals, was committed to the end of his days to the ideals of humanism and justice."
Chinese President Xi Jinping said the Chinese people would always remember Mr Mandela's "outstanding contributions to the China-South Africa relationship and the course of progress of mankind".
French President Francois Hollande said Mr Mandela's message would "continue to inspire fighters for freedom, and to give confidence to peoples in the defence of just causes and universal rights".
Germany's Chancellor Angela Merkel said Mr Mandela's "political legacy of non-violence and the condemnation of all forms of racism" would continue to inspire.
President Assad of Syria, who is currently fighting a revolt against his rule, said Nelson Mandela's life was an inspiration to freedom fighters and a lesson to tyrants.
Ghana's President John Mahama told the BBC Mr Mandela was the greatest African who ever lived.
Senegalese President Macky Sall said "Nelson Mandela was undoubtedly the most influential man of the century", a "role model for Africans and also for humanity". He said Mr Mandela gave Africans "pride in being black - a dignity in being a black man".
Kenyan President Uhuru Kenyatta praised him for living "an extraordinary life in a very ordinary way. His legacy encrypts the story of humanity now and tomorrow."
Mr Mandela was an "inspiration to the oppressed peoples all over the world" and had made "unparalleled personal sacrifices", said Nigerian President Goodluck Jonathan.
Liberia's President and Nobel peace prize laureate Ellen Johnston Sirleaf told the BBC that Mr Mandela was a constant inspiration and would never be forgotten: "Nelson Mandela lives on as his life will continue to be the guiding light for those who excel, for those who have suffered for freedom and for peace."
Brazil's President Dilma Rousseff said Mr Mandela would "guide all those who fight for social justice and for peace in the world".
Venezuelan President Nicolas Maduro compared the death of Mr Mandela to the passing of the late Venezuelan leader, Hugo Chavez: "Nine months after the departure of our commander, today another giant of the people leaves this world. Madiba you will live forever!"
Cuban leader Raul Castro said he was grateful for Mr Mandela's friendship and and steadfast support of the Cuban people.
Indian Prime Minister Manmohan Singh said: "This is as much India's loss as South Africa's. He was a true Gandhian. His life and work will remain a source of eternal inspiration for generations to come.''
For UN Secretary General Ban Ki-moon, Mr Mandela "was a giant for justice and a down-to-earth human inspiration".
Queen Elizabeth II, who met Mr Mandela on several occasions, said in a statement she was deeply saddened to learn of his death and remembered their meetings with great warmth.
"A great light has gone out in the world," said British Prime Minister David Cameron. Mr Mandela was "a towering figure in our time; a legend in life and now in death - a true global hero", he said.
Israeli Prime Minister Benjamin Netanyahu described Nelson Mandela as "the most honourable figures of our time". He added: "He was the father of his people, a man of vision, a freedom fighter who rejected violence. He set a personal example for his people in the long years he spent in prison."
For the Palestinian Authority leader, Mahmud Abbas, Mr Mandela was "a symbol of the liberation from colonialism and occupation". Mr Abbas added that "the Palestinian people will never forget his historic statement that the South African revolution will not have achieved its goals as long as the Palestinians are not free".
Afghan President Hamid Karzai called him "an icon of our time, for man's dignity, equality and freedom".
Iran's President Hassan Rouhani said in a statement that Mr Mandela "had a firm belief in the freedom and equality of all humans, not only in his country South Africa, but also across the world", adding his life had been a "rough and rugged road full of hardship".
Other public figures
South African ex-President FW de Klerk, who freed Mr Mandela from prison in 1990 and shared the Nobel Peace Prize with him in 1993, said: "Tata, we shall miss you - but know that your spirit and example will always be there to guide us to the vision of a better and more just South Africa."
UN High Commissioner for Human Rights Navi Pillay said Mr Mandela "was perhaps the greatest moral leader of our time".
Former US Secretary of State Hillary Clinton said Mr Mandela's appeal had been universal: "To combine within one's self the contradictions that he lived with, a lawyer and a freedom fighter, a prisoner and a leader, a man of anger and of forgiveness, has so captured the hearts of people not only in his country, but as we are seeing with the outpouring of response to his death, people around the world."
Former Soviet leader Mikhail Gorbachev said the world would not forget Mr Mandela. "his life sets a tremendous example. He was loyal to the cause of freedom."
Former Irish President Mary Robinson said: "His death leaves us bereft - it is felt by all of us as a personal loss."
"We will remember him as a man of uncommon grace and compassion, for whom abandoning bitterness and embracing adversaries was not just a political strategy but a way of life," said former US President Bill Clinton.
"It's not just what he did but the way he did it that makes him so special," said former British Prime Minister Tony Blair. "He did it with a grace and a dignity that I think really inspired people everywhere."
Campaigners and religious figures
From the Vatican, Pope Francis paid tribute "to the steadfast commitment shown by Nelson Mandela in promoting the human dignity of all the nation's citizens and in forging a new South Africa".
The exiled Tibetan spiritual leader, the Dalai Lama, said not it was time for people "to develop determination and enthusiasm to carry on in his spirit".
US civil rights leader Jesse Jackson described Mandela as a global "force for good - with his suffering and his vision, he chose at a critical moment reconciliation over retribution."
"He was a unifier from the moment he walked out of prison," said South Africa's Archbishop Emeritus Desmond Tutu. "We are relieved that his suffering is over, but our relief is drowned by our grief."
"Mr Mandela made us all understand that nobody should be penalised for the colour of his skin or the circumstances into which he was born," Burmese opposition leader and Nobel peace prize laureate, Aung San Suu Kyi said. "He also made us understand that we can change the world."
"Nelson Mandela's commitment to human rights was epitomised by his unswerving resolve to stamp out racial inequality during apartheid, followed by his vital work in combating HIV/Aids in South Africa," said Amnesty International Secretary-General Salil Shetty.
"All of us who admired him must carry on his struggle."
"How to conceive of a South Africa - no, a world - without Nelson Mandela, our Madiba, whose matchless humanity was bountiful enough for us to share with the world?" wrote Nobel Prize-winning South African poet Nadine Gordimer in a Globe and Mail piece.
"For myself, I can only be infinitely grateful that I knew him personally, that he touched my life."
Another South African writer, Zakes Mda, questioned Mandela's legacy in an article for the New York Times: "It is ironic that in today's South Africa, there is an increasingly vocal segment of black South Africans who feel that Mandela sold out the liberation struggle to white interests."
Eddie Daniels was imprisoned with Nelson Mandela on Robben Island for a number of years: "Mr Mandela was the first person to befriend me when I went to Robben Island. I was all alone and Mr Mandela came and he befriended me and throughout my prison career Mr Mandela was there to help me to guide me to sympathise with me whenever."
Christo Brand was one of the prison guards responsible for Mr Mandela during his time in jail. He and Mr Mandela developed a friendship over the course of many years: "I miss my, like I said, Mandela my prisoner, my friend and my father. We miss him a lot."
Idris Elba, who played the lead role in Mandela: Long Walk to Freedom, said: "What an honour it was to step into the shoes of Nelson Mandela and portray a man who defied odds, broke down barriers, and championed human rights before the eyes of the world. My thoughts and prayers are with his family.''
Another actor who played Mandela, Morgan Freeman, said the world had lost "one of the true giants of the past century. Nelson Mandela was a man of incomparable honour, unconquerable strength, and unyielding resolve - a saint to many, a hero to all who treasure liberty, freedom and the dignity of humankind."
"Among the many things one can say about our Madiba (Nelson Mandela's tribal name) is that he never thought of himself as big," said South African male choral group Ladysmith Black Mambazo. "He was one of us, one of the people."
Boxing legend Muhammad Ali said: "What I will remember most about Mr Mandela is that he was a man whose heart, soul and spirit could not be contained or restrained by racial and economic injustices, metal bars or the burden of hate and revenge.''
"He was one of the most influential people in my life. He was my hero, my friend, and also a companion to me in our fight for the people and for world peace" said Brazilian football icon Pele.
"It was as if he was born to teach the age a lesson in humility, in humour and above all else in patience," said Irish rock star and campaigner Bono.