Spanish police have detained a fourth suspect over the killing of Samuel Luiz.

Mr Luiz was beaten to death in the northern city of A Coruna on Saturday in a suspected anti-gay hate crime, which sparked mass protests across the country.

"He is a man between 20 and 25 years old and he is accused of homicide and undue appropriation," Spanish national police said on its twitter account.

The man is a friend of the three other suspects, who were detained earlier this week, a police officer told Reuters. He is suspected of taking Mr Luiz's mobile phone.

Mr Luiz, a 24-year-old nursing assistant, was killed in the early hours of Saturday outside a nightclub. A witness told La Sexta TV station Luiz's assailants shouted homophobic slurs during the beating.

Protesters took to the streets of Spain's main cities on Monday night to vent their fury at the killing and to demand better protection for gay rights.

Video footage of the riot police reaction to the protest in Madrid prompted the government to open an investigation into whether it was excessive.