Migrants from Africa set fire to rubbish bins in the Spanish coastal city of Roquetas de Mar on Saturday.
Spanish media reported the incident happened after a man was stabbed to death.
The 41-year-old was from the West African country of Guinea-Bissau.
About 30 people took part in the unrest, but police are remaining at the scene for the next few days.
“The police took control of the situation, and everything was clear afterwards, but these people came with their faces covered, and they’re people that don’t even live here in Roquetas, they just came to complicate the lives of the citizens that live here,” said Gabriel Amat, Roquetas de Mar Mayor.
Locals were advised to stay indoors on Saturday as dozens of riot police were stationed in the area.
Roquetas relies heavily on tourism, but has an unemployment rate of 31 percent, much higher than the national rate of 21 percent.