Australia's prime minister on Sunday suggested an anti-Muslim senator should be charged after he slapped a teen who cracked a raw egg over the legislator's head.

Sen. Fraser Anning has been widely condemned for blaming Muslim immigration for racist attacks on two New Zealand mosques that claimed at least 50 lives.

Will Connolly, the 17-year-old boy who egged Anning, has become an online hero for the incident.

Prime Minister Scott Morrison on Sunday took Connolly's side, telling reporters: "The full force of the law should be applied to Sen. Anning."

Police allege Connolly, who calls himself "Egg Boy" online, assaulted the senator with the egg.

Anning "retaliated and struck the teen twice" before Connolly was dragged to the ground by Anning supporters, a police statement said.

"The incident is being actively investigated by Victoria Police in its entirety," the statement said, including Anning's actions.

Anning came under blistering criticism over tweets on Friday, including one that said, "Does anyone still dispute the link between Muslim immigration and violence?"

"The real cause of the bloodshed on New Zealand streets today is the immigration program which allowed Muslim fanatics to migrate to New Zealand in the first place," he said in a later statement.

Anning has now been assigned a federal police security detail, a precaution usually reserved for the prime minister.

New Zealand Prime Minister Jacinda Ardern for the first time on Sunday joined the public condemnation of Anning.

Asked by a journalist what she thought of Anning's comments, she replied simply: "They're a disgrace."

Story continues

A GoFundMe page set up to raise 2,000 Australia dollars ($1,400) to pay for Connolly's "legal fees" and "more eggs" had exceeded AU$25,000 on Sunday.

Senator Anning strikes the teenager who broke an egg over his head Credit: Australia Pool

The site says most of the money will go to Christchurch victims.

"Love the spunk of egg boy who puts his egg where we'd like it to be!" donor Val Lehmann-Monck posted.

"This kid is awesome. The senator will not get re-elected due to the publicity and those comments and his reaction," donor Nikhil Reddy wrote.

After the egging, Anning supporters pinned Connolly to the ground until journalists appealed for him to be allowed back on his feet, The Sun-Herald newspaper reported.

Far-right activist Neil Erikson, who was involved in tackling Connolly, shouted for reporters to be removed from the area.

"Get the journalists out of here ... If you don't like, get out," Erikson was quoted as saying.

Police say they arrested Connolly, took his details and then released him without charge.

Connolly urged his online followers not to follow his example.

"Don't egg politicians. You get tackled by 30 bogans at the same time," he said in a video, using Australian slang for a poor, ignorant white person.

"I learnt the hard way," he added.