Mr Murphy handed Judge Morris a letter from Ahmed saying: "It gives some of his feelings about the trial, some good, some bad."

The court heard that Ahmed almost got away with murder.

He fled the scene and flew to Somalia, where he was born, just days after the street shooting.

But, unknown to him he left behind at the murder scene his wallet.

A bank card belonging to him was also found in the roof lining of the Volkwagen Sharan driven by the killers.

Murder: A sub-machine gun was found in undergrowth

The court heard that the killers and the victim were drug rivals and had a falling out.

Iain McSporran, prosecuting, said: "The Crown's position is that there appears to have been an organised crime group consisting largely of Somalian males with London connections, operating in Glasgow and Edinburgh."

They split into two rival factions shortly before the murder.

Two days before the fatal shooting a message was sent saying: 'The guns are coming out.'

On May 26, 2013, the Sharan with the killers on board chased the Ford Focus containing Mr Abdi and his associates through the streets of Edinburgh.

It ended with the Sharan crashed into fencing beside a tennis court.

After Mr Abdi got out the Focus and was striking the rear of the Sharan with a baseball bat, he was shot with a sub-machine pistol from within the car.

The court heard that five shots were discharged from the machine gun before it jammed.

Three of them hit Abdi the fatal shot was through the chest.

The Crown's position is that it is not possible to say who fired the fatal shot.

Deadly: The murder was thought to be over a drugs quarrel

Ahmed was convicted of murder on an art and part basis, a term in Scottish law that relates to aiding and abetting.

Victim Mr Abdi and his companions were armed only with baseball bats.

In evidence Ahmed denied fleeing to Somalia just days after the murder.

He said his flight there via Dubai was booked weeks before to give him a break from his girlfriend whom he believed was cheating on him.

His wallet containing bank cards, both parts of his driving licence, a health card and a card for Gala casinos was found close to the scene where Mr Abdi was machine gunned to death.

Murder: Mr Abdi was shot three times in a savage killing at Duddingston Road West

Another bank card was found in the roof lining of the VW Sharan used by the killers.

But Ahmed denied being in Duddingston, Edinburgh, on May 26, 2013.

When asked where he was he said: "I would be home in London sleeping or watching TV.

"I was at home with my family."

Asked if he was involved in the murder of Mr Abdi he replied: "No. I've never been involved in criminal activities."

The court heard that Ahmed lived in London Road, Glasgow, with his girlfriend and their daughter, but had fallen out with her because he suspected her of cheating on him.

But, despite this he claimed he had given his wallet to his friend Ahmed Ahmed on May 23, 2013 to take back to his flat in Glasgow.

He said: "I like all my things to be neat.

"The Glasgow address was my correspondence address."

Evidence: A bullet was found as police searched for clues

Iain McSporran said: "It's a lie from start to finish," and Ahmed replied: "I deny that 100 per cent."

Ahmed who worked in a hotel in Mogadishu for 16 months said that he had decided to return to the UK to clear his name.

When asked why he had not left his wallet at his family home in London Ahmed claimed it was because his girlfriend did all his correspondence and banking.

Mr McSporran said: "The reason your wallet was there at the scene of a murder is because you dropped it.

" You were party to a murder and fled the scene and you are now concocting a preposterous lie," and Ahmed replied: "No, sir. I'm an innocent guy."