Tens of thousands of people in the Ghanaian capital Accra have attended the state funeral for President John Atta Mills, who died suddenly in July.
Some 18 African heads of state and US Secretary of State Hillary Clinton witnessed the ceremony in Accra’s Independence Square.
Mills, who had long suffered from throat cancer, died only five months before he was set to seek re-election.
A BBC reporter in Accra says his death has united Ghanaians in grief.
She says his death was seen as a test for the country’s young democracy.
Mills, who started a four-year term in January 2009, was succeeded by Vice-President John Dramani Mahama.
Ghana has won international plaudits for the swift manner in which it handled the transition in a nation known for its divisive politics.
“Today a dark cloud hangs over Ghana, over Africa and indeed over the entire world,” Mr Mahama told the thousands of mourners who were able to watch the proceedings on large television screens set up around the square.
“President Mills was the very embodiment of what has been missing from our politics – civility, humility in service, honesty,” he said.
The BBC’s Vera Kwakofi says people began gathering before dawn in and around Independence Square, dressed in the official colours of mourning – black and red.
John Atta Mills
Born in western Ghana on 21 July 1944
Lawyer by profession
Lectured in law for more than 20 years
Vice-president from 1997 to 2001
Became president in 2009
Married to a marriage counsellor
Obituary: Ghana’s John Atta Mills