The Australian government has said that an "administrative error" prompted 23 of its senators to vote for a motion which stated "it is OK to be white".

The motion by Pauline Hanson, leader of the anti-Islam One Nation party, also condemned "anti-white racism". It was defeated 31-28 in a vote on Monday.

Critics noted that the phrase "it's OK to be white" has been associated with trolls and white supremacist groups.

PM Scott Morrison said the level of government support was "regrettable".

Responding to a backlash on Tuesday, the government said its senators had misunderstood the motion due to an internal "process failure".

A senior minister, Christian Porter, blamed an "early email" sent by his staff without his knowledge. It had told senators to support the motion.

"The associations of the language were not picked up. Had it been raised directly with me those issues would have been identified," he said in a statement.

Among those to support it were Trade Minister Simon Birmingham, Indigenous Affairs Minister Nigel Scullion and Deputy National leader Bridget McKenzie.

Political opponents dismissed the motion as another stunt by Ms Hanson, who last year hit the headlines for wearing a burka.

'Pathetic' U-turn
Labor rejected the government's explanation, saying the motion had been circulating since last month.

"This is just a craven and pathetic attempt to clean up your mess," the party's Senate leader, Penny Wong, said on Tuesday.

The phrase "it's OK to be white" has been popularised online among far-right groups.

Its inclusion in the motion is also seen as a nod to the Canadian activist Lauren Southern, who wore a T-shirt emblazoned with the phrase when she visited Australia earlier this year.

In March, Ms Southern was refused entry to the UK on the grounds that her actions "present a threat to the fundamental interests of society".

Speaking ahead of the vote, Ms Hanson said "people have a right to be proud of their cultural background, whether they are black, white or brindle".

"If we cannot agree on this, I think it's safe to say anti-white racism is well and truly rife in our society."

But other lawmakers described it as a stunt. Many critics noted it followed recent condemnation of a senator who used the term "final solution" while calling for immigration restrictions based on race.