He warned that any debate and reassessment of the alliance "should flow from clear-eyed analysis and judgment, not the emotional reaction to one person".

"It is hardly insightful to say that Donald Trump is very different to any President with whom we have engaged over the past 70 years. Understandably, that difference has stimulated intense global interest and scrutiny.

"Who doesn't now look at their iPhone first thing in the morning to see the latest Tweet?

Mr Richardson said that, within the region, Australian governments "generally have a strong and consistent record of charting their own course with the alliance part of the overall strategy not the driver of the strategy".

While Australia should build relations with China, there were "complexities" and the two countries "were not allies".

"I think Australia's relationship with China and the United States will continue to be able to be summarised simply – friends with both, allies with one," he said.

"It is no secret that China is very active in intelligence activities directed against us. It is more than cyber. That is no reason to engage in kneejerk, anti-China decision-making or to avoid seeking to build a stronger relationship with China. It is simply the world in which we live.

"The Chinese government keeps a watchful eye inside Australian Chinese communities and effectively controls some Chinese language media in Australia."

The former chief spy said he "would be surprised" if discussions weren't already going on about how to protect Australian political parties from the sorts of interventions seen in other countries' elections.

"None of us would think it was a good thing if any of the political parties were hacked," he said. "I would certainly hope that we never experience, in Australia, what the US experienced during their last election."