But the raider was nabbed after leaving a fingerprint at the scene and when he was arrested police found pictures of him wearing the Ali G mask as well as images of his loot, weapon and the police appeal about the robbery - all saved on his phone.

Jailing him for three years and four months, Judge Penny Moreland told McMurrough: “In drink and having taken drugs, just before midnight, you went to the BP garage in Sunderland wearing a mask and armed with a knife.

Karl McMurrough, jailed for robbing petrol station wearing Ali G mask

“You behaved aggressively towards the man working behind the counter, terrifying him by brandishing the knife, knocking over items on the counter and demanding money.

“You were identified because you left a finger print inside the door and you were foolish enough to take photos on your phone of you wearing the mask you wore to commit the robbery, the proceeds and police appeal for witnesses.”

CCTV footage of the raid on July 30 at the BP garage on Broadway, Sunderland, showed McMurrough wearing the mask of the fictional character when he entered the fuel station shop.

He knocked items near the counter on to the floor and pointed a blue knife at the shop worker, who was forced to hand over £90 in takings.

Mr Bunch told the court McMurrough came up with a false alibi when he was arrested and he was granted bail while his phone was examined.

Mr Bunch added: “Cameras covering the address he said he had been at showed he did not attend at the time he said he had done.

“More significant was interrogation of the phone which had been taken from him. That contained various matters of interest.

“There was text attached to a photo saying ‘when the love runs out, the mask and gloves come out’. The photo showed the mask the defendant was seen wearing, together with a matching knife and a baseball bat.

“There was a photo of money in a cash bag, matching what had been taken, and even a copy of the police appeal for witnesses in relation to the incident.