Former US president Bill Clinton has urged leaders in Northern Ireland to finish the peace building of Martin McGuinness.
He read a eulogy at the funeral of the ex-IRA commander and former deputy first minister, who he said "persevered and prevailed".
Mr Clinton told mourners at a requiem mass: "He risked the wrath of his comrades and the rejection of his adversaries.
"He made honourable compromises and was strong enough to keep them and came to be trusted because his word was good. And he never stopped being who he was."
Thousands of people packed the streets around Mr McGuinness' home in Derry's Bogside as his body was taken to a church.
Mr Clinton said: "Our friend earned this vast crowd today. Even more, he earned the right to ask us to honour his legacy by our living. To finish the work that is there to be done."
The neighbourhood came to a standstill as the politician's coffin, draped in the Irish Tricolour, was carried to St Columba's, led by a lone piper.
During the slow procession to the church, his widow Bernie, as well as Sinn Fein president Gerry Adams and the party's leader at Stormont, Michelle O'Neill, were among those who helped carry the coffin.
There was applause inside the church when some politicians arrived, including for ex-first minister and Democratic Unionist Party leader Arlene Foster, who survived an IRA bombing as a teenager and whose father was shot by the IRA.
Mourners at the Derry service were told Mr McGuinness was a former IRA commander who became a mainstay of the peace process.
They also heard that the politician, who died on Tuesday from a rare heart condition aged 66, "bequeathed to us a better place to live".
Although thousands of supporters have lauded Mr McGuinness' legacy, his death has drawn a very different response from many IRA victims, with some bereaved relatives not prepared to forgive him for his paramilitary past.
Chief celebrant Father Michael Canny recalled speaking to Mr McGuinness where the Sinn Fein veteran acknowledged that many people struggled with his IRA past.
"Republicans were not blameless, and many people right across the community find it difficult to forgive and impossible to forget," he said.
"By any standards, Martin McGuinness was a remarkable man and his life was a remarkable journey. The values he had, the principles he championed are still very much alive."
Rev David Latimer, of the First Derry Presbyterian Church, said: "Martin has bequeathed to us a better place to live.
"It was his commitment to create a new order of co-operation where we will be able to live in relationship and not out of relationship and get to know each other better."
Bishop Donal McKeown, Bishop of Derry, thanked those who were involved in securing the Good Friday Agreement who travelled for the mass, including from within Northern Ireland and the Republic and Britain and the US.
Irish President Michael D Higgins and his predecessor, Mary McAleese, attended the service, as did Irish Prime Minister Enda Kenny and former PM Bertie Ahern.