Australian police have used pepper spray to separate clashes between anti-racism protesters and rightwing nationalists in Melbourne. At least seven of several hundred demonstrators were arrested.

The ugly clash in Coburg in the northern part of the city happened on Saturday morning, AAP reported.

Two groups of activists, one protesting what they see as the threat of Islamization and the other decrying the first one as racist, defied heavy rain to gather at Bridges Reserve and later march to the old Pentridge Prison.

Victoria police deployed 500 officers, including some 50 riot police from the mounted branch, at the site. The law enforcers tried to separate the two rival groups, but at least three times protesters slipped through the lines and clashed with each other.

The brawls involved people being kicked in the head and even hit with the pole of an Australian flag.

Victoria police reported arresting seven people, five of whom had been charged with various offences, including rioting, assaulting the police and attempted robbery.

"I understand the need and the right to protest ... but what we can't have is this violence in our community," Victorian state Police Commander Sharon Cowden told Sky. "We saw inappropriate and often cowardly behavior, people wearing masks."

According to the Herald Sun, it was the seventh rally involving anti-Islam protesters that has turned violent in Melbourne.