The Archbishop of Canterbury has praised Nelson Mandela for his "extraordinary" courage at a service of thanksgiving for the life of the former South African president, who died last week.
The Most Rev Justin Welby told a congregation at St Martin-in-the-Fields in London's Trafalgar Square that the 95-year-old was the "rarest of leaders" as he thanked God for his life.
Mr Mandela's death on Thursday provoked a worldwide outpouring of emotion, with the Queen and Prime Minister David Cameron amongst those paying their respects.
The archbishop read the sermon at the service, saying: "Great injustice is overcome only by great courage. Evil can never be placated, it must be defeated: that means struggle, and struggles demand courage.
"Nelson Mandela showed his courage by his determination in the face of evil and by his humanity in the experience of victory. What is more, such courage and humanity were learned and demonstrated in the mists of conflict and suffering. He was that rarest of leaders, those who learn from terrible events so as to exhaust all their lessons, rather than being shaped by them into bitterness and hatred."
The archbishop said Mr Mandela's life, and those of many in South Africa, had been full of oppression and injustice.
"Not everyone responds to such treatment with resistance," said Mr Welby. "Many of us would have kept our heads down, made what we could of life, looked after those close to us, and closed our eyes to what was happening. We would have said to ourselves, 'Life is tough enough, do not make it worse by swimming against the tide'.
"But Mandela had courage that showed itself in leadership. He stood out, resisted, and fought. He faced the insult of being labelled a terrorist for fighting for his own people, the absurdity of trial for treason against an utterly wicked regime."
It was in the "school of hatred" that was prison that Mr Mandela "learned to treasure the ideal of a just nation", the archbishop said.
"His courage was undefeated, indomitable, extraordinary," he added. "His capacity to go on becoming more human was breath-taking. His guards grew to respect and even love him. One called him a father figure, whose absence was a bereavement. Robben Island was defeated by someone who could take everything it threw at him, and by melting courage into forgiveness, create the gold of reconciliation."
He called for prayers for South Africa as the nation mourned Mr Mandela and sought to find those to continue his work.
He ended his sermon by saying: "Ask God for every nation to have leaders who are full of courage and resist evil, who learn from suffering, who turn that learning into love and make both into reality. And thank God for Nelson Mandela, South Africa's amazing grace."
The service was led by the Rev Dr Sam Wells, vicar of St Martin's.
After the South African national anthem was played, the Rev Dr Sam Wells, vicar of St Martin's, told the congregation: "It would be hard to name a world figure in the last 30 years more universally respected than Nelson Mandela.
"Today all the people of the nations of the world grieve his death."
He highlighted the church's history of close involvement with the anti-apartheid struggle and questioned whether the chains of apartheid would ever have been broken without "this remarkable man".
He continued: "Today is a chance to reflect on what South Africa has been through, to give thanks for the extraordinary life and witness of Nelson Mandela, and to recommit ourselves for the challenges ahead, that Mandela's vision may be renewed in the generations to come."
The service was broadcast on BBC Radio 4 and featured a live link to Christ the King Church in Sophiatown in Johannesburg.
Former Poet Laureate Andrew Motion read a poem called To Nelson Mandela: A Tribute during the service.
Westminster Abbey will hold a national service of thanksgiving for the life of Mr Mandela after the state funeral in South Africa on December 15, and parliament will hold a special ceremony to commemorate his life.
A book of condolence has been opened in St Margaret's Church at the abbey.
A minute's applause was held before kick-off at football matches across the UK yesterday in Mr Mandela's honour.