A 40-year-old British man is being held in custody in Spain on suspicion he killed a man he had allegedly caught filming his daughter on a tablet.

The Briton was arrested on Saturday after he attacked a German national in a restaurant in the resort of Sotogrande.

The victim of the attack was a 43-year-old man who had been arrested just days prior to this for allegedly having child pornography, The Guardian reports.

“The victim had been arrested by the civil guard a few days ago for possession of child pornography," a spokeswoman for the civil guard explained.

His attacker was unaware of this fact at the time.

"We stand ready to provide consular assistance if requested," a spokeswoman for the Foreign Office, which is set to start an investigation, said according to BBC.

Spanish police said that when they found the victim, who later died in a hospital in nearby La Linea de la Concepcion, the man had "very serious" wounds. The spokeswoman for Spain's civil guard explained to the Press Association that the altercation “apparently began because of alleged recordings that the victim was making of the aggressor's daughter.”

"When he saw what was happening, he took the tablet off him, saw the recordings, threw the device to the ground and attacked him," explained the spokesman.

The British man is said to live in Sotogrande. Police said he left the restaurant after the assault but was later identified thanks to witnesses.

A source has revealed that his daughter is under the age of eight.

Officers say that the suspect has been remanded in custody after appearing before a magistrate.

A post-mortem examination has been conducted. Spanish authorities are awaiting the results in order to determine exactly how the victim died.