You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
The shootings happened just days after a Nigerian migrant was arrested in connection with the death of an 18-year-old Italian woman, whose dismembered body was discovered stuffed into two suitcases near Macerata.
Police named the suspected shooter as Luca Traini (28) and said he had an Italian flag draped over his shoulders when he was seized in the street by armed police. Onlookers said he made a fascist salute before being handcuffed.
"He drove around in his car and when he saw any black people he shot them," Marcello Mancini, a Macerata resident, told Reuters television. Police said one of the six victims was seriously hurt and needed surgery, but gave no further details.
Traini also fired shots at the offices of the ruling centre-left Democratic Party (PD) in Macerata, but did not injure anyone there. The PD said he had stood as a candidate for the rightist Northern League at local elections last year but had not received any votes.
The League backs fiercely anti-immigrant policies and is part of ex-prime Silvio Berlusconi's centre-right alliance that is leading in the polls ahead of a March 4 national election.
League leader Matteo Salvini distanced himself from the shooting, but blamed mass immigration for the tensions.
"I can't wait to get into government to restore security, social justice and serenity to Italy," he told reporters.
PD leader Matteo Renzi called for calm.
"The man who fired the gun, hitting six people of colour, is a squalid, mad person. But the state is stronger than him," he wrote on Facebook.
Prime Minister Paolo Gentiloni said Italy would come down heavily on anyone promoting violence.
"We will stop this risk. We will stop it immediately. We will stop it together," he said. "Hatred and violence will not be able to divide us."
Police said the shooter drove around Macerata, which is famed for its outdoor opera festivals, in a black Alfa Romeo car firing out of his window at migrants in various locations.
With police closing in, he left his car in the city centre but was almost immediately stopped. Local media said he shouted, "Long live Italy," as he was taken away.
Tensions in Macerata had risen this week following the gruesome discovery of Pamela Mastropietro's body. The teenager had run away from a drug rehabilitation centre on Monday and met a Nigerian asylum seeker, Innocent Oseghale, the next day.
Her body was found on Wednesday and a preliminary postmortem could not immediately identify the cause of death.
Witnesses said they had earlier seen Oseghale with the suitcases in which the body was found. He refused to talk to the police after his arrest. Newspapers said he was denied asylum last year but had remained in Macerata to appeal against the decision.
"What was this worm still doing in Italy?" Northern League leader Salvini wrote on Facebook at mid-week, accusing the centre-left government of responsibility for Mastropietro's death for allowing migrants to stay in the country.
"The left has blood on its hands," he wrote.
More than 600,000 mainly African migrants have reached Italy by boat over the past four years, and thousands have perished on the journey. The centre-right bloc, which includes the League, says the vast majority have no right to asylum and has promised mass expulsions if it takes power.
Leftist parties have ruled out any such deportations.
"What happened today in Macerata shows that inciting hatred and whitewashing fascism, as Salvini does, has consequences. It can spark violence," said Laura Boldrini, a leftist politician and the speaker of the lower house of parliament.