Officers tried to find him a spot at a YMCA and took him to a shelter

He walked into a police station and demanded to be deported

Man allegedly attacked two police officers after they tried to help him

A tourist who ran out of money while on holiday in Malta has been accused of deliberately slapping a police officer in an effort to get a free flight home.

Police said the 24-year-old man walked into a police station in the town of Marsa, demanded to be deported and attacked two officers after he was told it wouldn't be possible.

The penniless holidaymaker hoped by getting arrested he would be deported from the archipelago in the Mediterranean Sea, Malta Today reported.

Police said the man is accused of attacking two police officers in an effort to get deported (file photo)

The incident occurred after Gambian-born James John Konteh, who holds a Swedish passport, blew all of his €1,500 spending money (approximately £1,050 or $1,600), the newspaper reported.

He has been charged with assaulting a police officer, disobeying police orders, causing slight injuries to police officers, breaching the peace and causing criminal damage to a police car.

Mr Konteh is accused of smashing the car’s wing mirror.

So far his alleged plan has gone awry, as he remains in custody following a court appearance.

When he appeared in court he was told, through a translator, to be quiet after constantly talking in a loud voice, and a legal aid lawyer withdrew after he insisted on being represented by a lawyer from Sweden.

Court was told the man walked into a police station and demanded to be deported (file photo)

According to Malta Today, police Inspector Jason Paul Sultana said Mr Konteh arrived at the police station and claimed to be homeless, and then asked to be deported because he had no money.

Police claim he threatened to commit a crime and they tried to arrange for him to stay at a YMCA, but he was turned away because he did not have a letter of recommendation.

Mr Sultana told court Mr Konteh was taken to a local shelter, where he allegedly attacked two police officers.