(CNN) Police in Italy have arrested a man suspected of opening fire Saturday on foreign nationals in the town of Macerata, injuring six people.
A police photo shows a man being apprehended who appears to have an Italian flag wrapped around his neck.
The drive-by shootings were "racially motivated" and believed to be connected to the recent slaying of an 18-year-old Italian woman in which a Nigerian man was arrested, Macerata's mayor, Romano Carancini, told CNN.
The victims included five people from Nigeria and one from Gambia, according to Lt. Col. Andrea Corinaldesi of the Carabinieri.
The shootings took place near where the dismembered body of Pamela Mastropietro was found Tuesday.
The suspect in Saturday's shootings -- identified by Carancini as Luca Traini, 28 -- was apprehended by police while making a fascist salute in front of a monument to war victims. A gun was found in his car.
According to election records, Traini had been a candidate in the nearby town of Corridonia for the anti-immigration Northern League party in the 2017 local elections but received no votes.
Carancini confirmed to CNN that he was the same man.
"We must be united against hatred," Carancini said.
The shooting underscored racial tensions in Italy ahead of the upcoming national elections. Italy's Northern League party distanced itself from the shooter but the party's leader Matteo Salvini said mass migration has caused similar violent acts.
"Violence is never the solution, violence is always to be condemned. And whoever is guilty must pay," Salvini said in statement posted on Facebook. "Immigration out of control leads to chaos, anger, social confrontation."
Marco Valerio Verni, the uncle of the slain woman Mastropietro, told CNN affiliate Rai News: "All we want is justice. We cannot fight barbarism with more barbarism. Such actions are not justifiable. This country is fed up -- but such reactions can never be justified. We are a civilized country. We should not let barbarism prevail over civilization."