Kofi Annan has been laid to rest in his native Ghana as world leaders paid tributes to the former UN secretary-general with calls to keep alive the legacy of a “stubborn optimist” to create a better, more peaceful world.

At the funeral on Thursday, Annan’s widow, Nane Maria, led hundreds of mourners, including world leaders past and present, traditional rulers and global royalty and called her husband an “extraordinary” person who had a “joy of life”.

“My love, you are now back home where you started your long journey. But may your wisdom and compassion continue to guide us, wherever we are,” she said at the state funeral in the capital, Accra.

Annan led the UN from 1997 to 2006, becoming the first person from sub-Saharan Africa to do so. He died on August 18 aged 80 at his home in Switzerland after a short illness.

Thousands of people have filed past his coffin this week during three days of national mourning for Annan who was called “one of the truly iconic figures of modern times” by Ghana’s President Nana Akufo-Addo.

Many ordinary Ghanaians described him as a father figure and a source of national pride, while his brother, Kobina, told the congregation that he was more than a leader and statesman.

“We lost a brother, a husband, a father, a grandfather and an uncle, a man of deep conviction who was as committed to instilling the values of fairness, integrity, kindness and service in each of us as he was to advocating for peace and human rights around the world,” said Kobina.

The current UN Secretary-General, Antonio Guterres, praised his close friend as an “exceptional global leader” who was dignified, courageous and a man of “integrity, dynamism and dedication”.

“Kofi Annan was the United Nations and the United Nations was him,” he added.

Annan, who was originally from Kumasi, the capital of the Ashanti region in southern Ghana, was awarded the Nobel Peace Prize in 2001.