Australia's opposition leader has described some of the presumptive Republican presidential candidate Donald Trump's views as "barking mad," breaking a longstanding Australian convention of avoiding taking sides in U.S. political contests.

Prime Minister Malcom Turnbull criticized opposition leader Bill Shorten for potentially offending Americans through his comments during a radio interview on Friday.

Australia is in the early weeks of campaigning before the July 2 election and how its leader would deal with a possible President Trump has emerged as an issue.

The United States is Australia's most important strategic ally and successive Australian governments undertake to work with whatever administration Americans choose.

Center-left labor Party leader Shorten told a Darwin radio station that a Trump administration was among "the sort of scenarios you hope don't emerge."