The 40-year-old man taken into custody for an attack on Sandro Rottman, 43, a German national who subsequently died from his injuries, has been named locally as Kainth Devinder.
It was reported that the German had been arrested only a few days earlier for possession of child pornography.
It is alleged that Devinder saw the man filming his young daughter with a tablet device at the busy Spinnaker restaurant in the Sotogrande port on Saturday night.
"The girl's father got up and went to the table where the victim was," a source in the Civil Guard police force in the city of Algeciras told AFP, citing witnesses.
"He took the tablet off him, saw that there were recordings of his daughter, and that was when the attack took place."
The restaurant owner confirmed to The Local that the incident had taken place on Saturday. "Yes, it was Sandro who was attacked but I don´t know the other man, who has been here only few times before,"
"It happened on Saturday night but the police have told me not to talk about it because of the investigation," he said.
No weapons were involved in the attack, the police source said adding that it appeared the German had died from a punch to the head. He was taken to the hospital in La Linea where he died and police were waiting for the results of an autopsy.
The British man left the restaurant after the attack but was arrested later after being identified by witnesses. He and his victim were named online in El Periódico de Sotogrande.
He was in police custody on suspicion of murder and was waiting to go before a magistrate in the nearby town of La Linea de la Concepcion on Monday afternoon.
The Civil Guard said in a statement that the man who was killed had been arrested a few days earlier for possession of child pornography.
The source said it was thought that the two men did not know each other. It was not known whether the attacker knew of the earlier child porn accusations.
A spokesman from the British Embassy told The Local: "We are urgently investigating reports of the arrest of a British national in the Cadiz area in southern Spain. We stand ready to offer consular assistance if requested."