Image copyright Getty Images

When Muammar Gaddafi was toppled in 2011, there were scenes of jubilation in Libya. But Jake Wallis Simons didn't have to go far in Ghana to find those who have fond memories of the executed Libyan leader, and are still mourning his loss.

One recent Sunday afternoon, amid the yellow dust, sunshine and traffic fumes of Accra, I met a man who told me that Colonel Gaddafi was the messiah.

The man's name was Karim Mohamed, an ebullient 45-year-old tailor who had spent three years living and working in Libya before the fall of Gaddafi.

He was married with three children, and lived in a six-bedroom house that he had built himself using the money he had earned in Libya.

"In Libya, everybody was happy," he told me. "In America, there are people sleeping under bridges. In Libya, never. There was no discrimination, no problems, nothing. The work was good and so was the money. My life is all thanks to Gaddafi. He was the messiah of Africa."

Karim was far from unusual in this part of Ghana. As we talked, two other men sauntered over to join the conversation, and turned out to share his passion for the late Libyan dictator.

"Gaddafi was a nice guy," said Mustafa Abdel Momin, a cheerful, 35-year-old construction worker who had worked in Libya for seven years. "He never cheated anybody. He was perfect. The best."

"What was the point of killing him?" added Eliyas Yahya, the local imam, who had a round hat, a pointed beard and a very loud voice. "You kill someone to solve the problem and now the problem is worse. Why kill Gaddafi?"

Find out more

Image copyright Thinkstock

From Our Own Correspondent has insight and analysis from BBC journalists, correspondents and writers from around the world

Listen on iPlayer, get the podcast or listen on the BBC World Service or on Radio 4 on Saturdays at 11:30

Gaddafi may have been a ruthless autocrat, but for years the relative affluence and stability of his rule was a godsend to migrants desperate for work. My new friends were among the tens of thousands of Africans who had used money earned in Libya to break themselves from the cycle of poverty at home.

As we talked in the shade of a small grocery shop, the evidence was all around us. This was a district in the north of the city known locally as the Libyan Quarter, home to a community of Ghanaians who had made their money under the Gaddafi regime.

The ramshackle houses that characterise many parts of Accra were nowhere to be seen here. Instead there were modern, spacious residences lining the orange dirt road, stretching into the distance.

Karim pointed out what I had thought was a municipal building on the corner. As it turned out, it was actually a mansion belonging to a man called Sheikh Swala, who had started several successful businesses using money he had earned in Libya. The house had 30 bedrooms. And without Gaddafi, it would never have been built.

Indeed, new construction was now a rarity in this neighbourhood. Here and there, some houses were even lying unfinished - when Gaddafi was deposed, the Libyan Quarter became frozen in time.

A diffident, 36-year-old man called Amadu joined our group. Nobody noticed him at first, as he seemed so withdrawn. But eventually, he told his story.

Image copyright Getty Images Image caption Migrant workers had to leave Libya in 2011 to escape the violence

Amadu had been among those unable to afford a proper Libyan visa. In 2010, he and several friends made the dangerous journey there overland, through the Sahara desert. They ran out of water and many of his group died, but he made it to Libya and found work as a tiler.

By the time war broke out in 2011, he had saved $3,500 (£2,300). He remembers standing on the docks in Tripoli when the first shots were fired, forcing him to run for cover. He was confined to his room for several days before he managed to escape back to Ghana, but he was unable to bring his hard-earned money with him. And that was how his dreams had died.

"There is nothing for the youth here in Ghana," said Mustafa. "After Gaddafi, we are full of crisis. Youth unemployment is sky-high and there is nothing for us to do. Either we end up living a life of crime because it is the only way to make money, or we try and make it to Europe."

The others agreed. "Now it is Europe, Europe, Europe, wherever on earth you go," said Eliyas loudly. "Some people are going to Brazil, if they can afford it. But for everyone else, it's Europe."

Before Gaddafi was ousted, he officially warned the European Union that if his regime were to collapse, as many as two million migrants would arrive on Europe's shores, creating chaos.

He may have been more a dictator than a messiah. But he seems to have been right about that.

Image copyright Getty Images Image caption Muammar Gaddafi photographed in Accra, Ghana in 2007

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.