An outspoken Australian MP has been widely condemned for attending a far-right rally in Melbourne alongside neo-Nazi supporters, but insisted it was “not racist” and the presence of people issuing Nazi salutes was irrelevant.

Fraser Anning, an independent MP, has been criticised for participating in the rally and flying to Melbourne at the public’s expense. The rally at St Kilda, a beachside suburb, was organised by a small far-right group and was promoted as “Romper Stomper 2.0”, a reference to an Australian film about neo-Nazis.

Scott Morrison, the prime minister, who is on leave, condemned Mr Anning’s attendance at the “racist rally”. He criticised the MP for “associating himself with extreme and offensive racist views that have no place in our society”.

“Australians are not anti-migrant nor racist,” he said in a statement.

But Mr Anning dismissed his critics, including Mr Morrison, as “all puppets of the United Nations”.

"They're all left-wingers and unfortunately the prime minister doesn't seem to understand Australians want an alternative," he told Channel Nine.

"[It was] no racist rally... Who was there at that meeting was irrelevant."

Mr Anning has previously been dumped by two small parties, including the anti-migrant One Nation party, and notoriously used his maiden speech last year to call for a “final solution” to the nation’s immigration problem. He later claimed he did not know about the use of the phrase by the Nazi party.