The suspect, a 21-year-old medical student originally from Logroño, gave himself up to police on Tuesday evening after randomly attacking five people between 5pm and 6pm on Monday.
Police said there was no connection between the man's victims, and that no words were exchanged.
The aggressor has previously has previously been charged over racist attacks in Logroño for his part in an incident in which several members of a group known as Nueva Época (New Era) attacked a Colombian man.
The people attacked on Monday included one Moroccan, one Pakistani, one Chinese person, a Spaniard and a South American.
The suspect will now be changed with carrying out racist and xenophobic attacks, Catalan daily La Vanguardia reported on Wednesday.