A convicted British robber has been shot dead by police in southern Spain after opening fire on officers as they tried to arrest him.

The man, named in media reports as Sean Hercules, 39, died in a shootout at a hotel in the resort town of Estepona, near Marbella, on Monday.

Spain’s national police said officers had gone to the hotel after a car accident in Puerto Banús on Monday morning. Witnesses called the police after seeing what they said was an armed man fleeing the scene of the accident. He was identified and tracked down to a hotel in Estepona that afternoon.

“The officers came under fire as they tried to arrest him, forcing them to use their service weapons, which resulted in the death of the person,” the Policía Nacional said, adding that the officers had been defending themselves and other people.

“Two firearms and four magazines were found by the dead body of this person, who was a British national with convictions for drug dealing and possessing weapons.”

Police said the incident remained under investigation.

The Foreign and Commonwealth Office did not name the dead man, but said: “Our staff are in contact with the family of a British man following his death in Spain, and have offered them support and advice on bereavement abroad.”

According to a report in the Yorkshire Evening Post, Hercules was sentenced to nine years in prison in 2001 for robbing a post office in Gipton, Leeds, but was released after serving less than half the term.

In 2006, he was sentenced to a minimum of six years for shooting a man with a sawn-off shotgun outside a nightclub in Leeds.

Passing sentence at Bradford crown court in June that year, the judge, James Stewart QC, said Hercules would be freed only if the parole board were satisfied he no longer posed a threat to the public.

“The citizens of Leeds who come out of nightclubs in the early hours of the morning are entitled to believe they live in a civilised society, not the Wild West,” he said.