Remember a time, years ago, certainly before the cascade of consequences that followed the September 11 attacks, when a healthy dose of scepticism about the influence of national security agencies on policy was far more common?

Former prime minister Paul Keating does, and he sparked a kerfuffle last night by saying senior foreign intelligence and domestic security officers should be turfed out. He thinks they have “lost their strategic bearings” and unnecessarily soured diplomatic relations with China.

“When the security agencies are running foreign policy, the nutters are in charge,” he told journalist Jane Norman.

His key point was really that Australia, the United States and its other allies had to accept and “recognise the legitimacy of China” and its rise to become a second superpower, and not focus only on what that means for their own economic and defence interests.

It all began when ABC political editor Andrew Probyn asked Keating how relations with China could be improved.

He argued “the fact that 20% of humanity has dragged itself from poverty” was part of the story of modern China that deserved respect, despite the fact “it may not suit the United States” to compete with another economic giant.

The former PM opined that a Labor government could improve diplomatic relations dramatically with Beijing simply by “making the point that China’s entitled to be there” and not implying it was a fundamentally “illegitimate” nation.

Probyn pointed out the same security agencies would advise either party, which led Keating to respond that all they would have to do is “clean them out” before taking aim in particular at the highly influential China expert John Garnaut, a former foreign correspondent who became a national security adviser to ex-PM Malcolm Turnbull.

“Once that Garnaut guy came back from China and Turnbull gave him the ticket to go and hop into the security agencies, they’ve all gone berko ever since,” he said.

“You know, when you have got the ASIO chief knocking on MPs’ doors, you know something’s wrong, you know?”

While the 1990s PM has no formal role in the current Labor team, and was only expressing a personal view, it seems he still has a knack for making people sit up and listen by taking a strong position and stating it bluntly.

The head of the government-funded Australian Strategic Policy Institute, Peter Jennings, was not amused. He said Keating was “blatantly incorrect” and this was “not something a former prime minister should do.”

“The Australian intelligence community, more than most parts of government, has a very clear understanding of what China is doing,” said Jennings.

Home Affairs Minister Peter Dutton leapt on the comments and demanded Labor leader Bill Shorten explain whether he would take up the public advice.

“Since September 2014, Australia’s law enforcement agencies have disrupted 15 major terrorist attack plots and conducted 41 counter-terrorism operations, with 93 people charged,” Dutton said in a statement, demanding to know if Keating was also telling Shorten to dismantle the Department of Home Affairs structure.

“The Coalition Government has increased funding of our law enforcement, intelligence and security agencies by more than $2.2 billion since August 2014.

“We also announced additional funding of $512 million in the 2019-20 Budget to detect, deter and disrupt terror threats and transnational crime.”

The Shorten team responded calmly and briefly: “Labor has great respect for our security agencies. We always work co-operatively with them in the national interest.”

The ABC website has the full interview, which covers a range of other subjects.