The Australian Senate has formally censured a politician who sparked outrage by blaming the New Zealand mosque attacks on Muslim migration.

Senator Fraser Anning, a far-right independent, made his comments on the day of the shootings in Christchurch which killed 50 people last month.

On Wednesday, politicians from across the political spectrum condemned his "inflammatory and divisive" remarks.

Mr Anning said the censure was "an attack on free speech".

The reprimand, the fifth to be passed by the Senate in the past decade, stated that Mr Anning's remarks last month did not reflect the views of the parliament or the Australian people.

He had said: "The real cause of bloodshed on New Zealand streets today is the immigration program that allowed Muslim fanatics to migrate to New Zealand in the first place."

His comments were "shameful" and "appalling", other politicians told the Senate. The censure read that Mr Anning had sought to "attribute blame to victims of a horrific crime and to vilify people on the basis of religion".

Though it carries no practical punishment, the censure is seen as an official condemnation. Politicians cannot be expelled from the parliament unless they are dual citizens, bankrupt, hold other offices, or have been convicted of an offence, constitutional law experts say.

Only one senator, Cory Bernardi, voted against the motion on Wednesday. Three others including Mr Anning abstained.

Mr Anning entered parliament in 2017 as a replacement for a disqualified senator, despite receiving just 19 votes in the 2016 election.

Last year he also drew condemnation for using the words "final solution" - a term invoked during the Holocaust - while calling for race-based immigration restrictions.

Public backlash
More than 1.4 million people signed a petition demanding Mr Anning's resignation in the days following his comments on 15 March.

At the time, New Zealand Prime Minister Jacinda Ardern called his remarks "a disgrace".

In one highly publicised incident, a teenage protester squashed an egg on the senator's head during a press briefing.

Mr Anning has repeatedly defended his comments. He left the Senate on Wednesday before the motion was passed.

Government Senate leader Mathias Cormann said Mr Anning's comments were "sadly made worse given [his] position in this parliament".

Labor Senator Penny Wong said there was "a difference between freedom of speech and hate speech", adding: "While those injured were being treated, this senator sought to further fan the flames of division."