A lone gunman has opened fire on African migrants in drive-by shootings in a central Italian city, wounding at least six people before being arrested, police said.

Six people were wounded, one seriously, in shootings in the central Italian city of Macerata shortly after 11am, the mayor has confirmed.

The suspect was identified as Luca Traini, a 28-year-old Italian with no previous record.

His motive was not immediately clear, but officials pointed to a recent gruesome killing of a young Italian woman in Macerata, allegedly at the hands of a Nigerian immigrant.

View photos A picture showing a man identified by Italian police as Luca Traini (AP) More

"Shots fired in Macerata. People injured. Police operation under way. Stay out of the way and avoid open places," the police said on Twitter.

Police said all those wounded were foreigners and they later confirmed the arrest of the unidentified suspect about two hours after the shooting erupted.

View photos Paramedics treat an injured person that was shot from a passing vehicle in Macerata (EPA) More

They published a photo of the suspect, a white Italian man aged 28 with an Italian flag draped over his shoulders, being taken away by armed officers.

Romano Carancini told Sky TG24 that the victims were five men and one woman.

A motive for the shootings was not immediately clear, but it comes just days after the dismembered body of an Italian teenager was found in the city. The main suspect is a Nigerian immigrant.

Mr Carancini confirmed that all of the victims in Saturday's shootings were black, and said that "the closeness of these two events makes you imagine that there is a connection".

Video posted by the newspaper il Resto di Carlino showed what appeared to be a body on the ground on a shopping street.

The shooting spree came days after the murder of 18-year-old Pamela Mastropietro and amid a heated electoral campaign in Italy where anti-foreigner sentiment has become a key theme.

The head of the anti-migrant Northern League, Matteo Salvini, has capitalised on the killing in campaign appearances, and is pledging to deport 150,000 migrants in his first year in office if his party wins control of parliament and he is named premier.

The teen's remains were found on Wednesday in two suitcases, two days after she walked away from a drug rehab community.

The news agency ANSA said two of the people injured in Saturday's shootings were black, and that witnesses reported that the car was seen in the area where the woman's body was found and also near where the suspect lived.

Story continues