Nelson Mandela death: Queen leads tributes
The Queen has led the UK in sending her "sincere condolences" to the family of Nelson Mandela and to the people of South Africa.
The monarch said she was "deeply saddened" to learn of his death.
A vigil was attended by hundreds outside Trafalgar Square's South Africa House, after David Cameron earlier visited to offer his condolences.
Meanwhile, books of condolence have been opened across the country, and flags are flying at half-mast.
The Queen said the former South African president "worked tirelessly" for the good of his country, adding that his legacy is "the peaceful South Africa we see today".
A statement from Buckingham Palace said: "Her Majesty remembers with great warmth her meetings with Mr Mandela".
'Sense of forgiveness'
Writing in a book of condolence at South Africa House, the prime minister said of Mr Mandela: "Your cause of fighting for freedom and against discrimination, your struggle for justice, your triumph against adversity - these things will inspire generations to come.
"And through all of this, your generosity, compassion and profound sense of forgiveness have given us all lessons to learn and live by."
He ended his message with a quote from Matthew 5:9 in the Bible: "Blessed are the peacemakers for they shall be called the children of God".
The central London site was once the scene of freedom vigils for Mr Mandela, who led South Africa's transition from white-minority rule in the 1990s after serving 27 years in prison for his political activities.
Members of the public queued to sign the book as flowers, candles and other tributes gathered outside the South African High Commission.
One tribute on a card read: "Thank you for the sacrifices you made for all of us."
Another read: "May God shine light on your homecoming in heaven. Rest in Peace Mr Mandela."
A book of condolence has opened for members of the public to sign at St Margaret's Church, Westminster Abbey. Further books will open at Coventry Cathedral, the city of peace and reconciliation, and at Leeds Civic Hall, after Mr Mandela was made a Freeman of Leeds in 2001.
St Paul's Cathedral is to hold an evensong service in memory of Mr Mandela at 17:00 GMT on Thursday.
A national service of thanksgiving for the life of Mr Mandela is to be held at Westminster Abbey in the new year. The state funeral in South Africa is due to take place on Sunday, 15 December.
The Foreign Office said it has requested that all UK national flags across the country be flown at half-mast until 20:00 GMT on Thursday. It also appealed for any foreign flags usually flown on the same stand as the Union Flag to be removed.
Mr Mandela made his first state visit to the UK in 1996, two years after he became South Africa's first black president.
The Prince of Wales said Mr Mandela was the "embodiment of courage and reconciliation".
The prince added: "He was also a man of great humour and had a real zest for life.
"With his passing, there will be an immense void not only in his family's lives, but also in those of all South Africans and the many others whose lives have been changed through his fight for peace, justice and freedom.
"The world has lost an inspired leader and a great man. My family and I are profoundly saddened and our thoughts and prayers are with his family. "On Thursday night, Prince William said the death of Mandela was "extremely sad and tragic".
The Duke and Duchess of Cambridge were attending the premiere of Mandela: Long Walk to Freedom, a film about the former South African president, when news of Mr Mandela's death broke.
Speaking after the film, Prince William said: "We were just reminded of what an extraordinary and inspiring man Nelson Mandela was and my thoughts and prayers are with him and his family right now."
The Archbishop of Canterbury, the Most Reverend Justin Welby, was among others in the UK to pay tribute to Mr Mandela.
He said: "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."
'Power of love'
Among others in the UK to pay tribute to Mr Mandela:
- Crowds gathered at the foot of the statue of the former president in Parliament Square in central London to pay their respects
- MPs paid tribute as plans were revealed for the UK Parliament to host a special ceremony to commemorate Mr Mandela's life
- Welsh MP Peter Hain, whose family were forced to flee South Africa because of support for the anti-apartheid movement said Mr Mandela was a "bright beacon of liberty and justice shining across the world"
- Northern Ireland's First Minister Peter Robinson said Mr Mandela was "inspirational", adding he had heard of his death with "deep sorrow"
- Scotland's First Minister Alex Salmond said Mr Mandela had been an "inspiration to countless millions"
- As sporting tributes poured in, England's cricket squad paid their respects by wearing black armbands as they stood for a two-minute silence before the start of the second day of the Second Test against Australia in Adelaide
- The British media has been reflecting on the life of Mr Mandela with a series of tributes
Mr Mandela, 95, had been receiving intense home-based medical care for a lung infection after three months in hospital.
His death was announced on South African national TV by the country's president Jacob Zuma.