Donald Trump has cast his shadow over the Australian election campaign with Prime Minister Malcolm Turnbull rebuking his opponent Bill Shorten for calling the presumptive US Republican nominee "barking mad". The Australian opposition leader's denunciation of Trump broke a longstanding tradition of Australian leaders not taking sides in US political contests.

Shorten, who has stepped up his attacks on Trump after he secured enough delegates in the US presidential race, said the surge is the "ultimate victory of celebrity politics", according to Reuters reports.

"Some people in America feel that politics doesn't speak to their lives and Trump is the ultimate protest vote," Shorten said during a local radio interview with Hot 100 in Darwin. However, he assured that his party would work with whoever wins the 8 November elections in the US.

Responding to this, Turnbull said: "You can imagine how Australians would feel if an American president were to describe one of our prime ministerial aspirants as barking mad. The Australian-American relationship is of vital importance, in every respect."

The US is Australia's most important strategic ally, and is the third biggest trading partner in terms of two-way trade, behind China and Japan.

Turnbull said private views about any potential presidential candidate should not be expressed in public as it "would be seen as being offensive to Americans".

"The choice of president is for Americans to make," he added.

Liberal leader Turnbull and the centre-left Labour Party's Bill Shorten are locked in a stiff fight in the 45th federal election in Australia, which is set to take place on 2 July.

Australian Prime Minister Malcolm Turnbull
Malcom Turnbull is campaigning for the upcoming general elections in Australia Reuters