Future Fund chairman Peter Costello believes security will be the biggest factor that defines Australia’s relationship with China moving forward, even if any decision on the access and sharing of technology would have a negative impact on the economy.

Speaking at the Australian Financial Review’s business summit earlier this week, Costello weighed in on the trending debate about China’s role in tech following the furor about Huawei and next-generation 5G mobile networks, and the country’s long running trade conflict with the United States.

Mr. Costello admitted that China had not been viewed as a potential major security threat during his time as federal treasurer between 1996 and 2007, but that there had been a marked shift in sentiment among security agencies around the world during the last several years.

The Future Fund chairman said new economic opportunities had been the primary factor that had driven policy during the late 1990s and 2000s, but the dynamic has now pivoted more towards security related concerns and a less outwardly pro-China view for Australia and its allies since around 2015.

Costello said the “defense and intelligence” angle has held the greater sway as business interests take a back seat. He noted that this heel turn stems mostly for real world events such as the tensions about sovereignty in the South China Sea, aid related rivalry in the South Pacific and major cyber security problems. A more recent worry for Australia is the ever-growing levels of Chinese investment in the country.

When posed with a theoretical question about a binary choice between economic ties with China or the United States, Costello said the latter would take priority as security is of paramount importance in today’s digitally connected world. He also said its long-standing relationship with the United States would mean it would favor an “ally” ahead of other viable alternatives.

“We are an ally of the United States,” Costello said on Tuesday. “We will obviously work with our allies. We are in an alliance. Australia regards itself as a friend of China, which is different to an ally.”

China’s tit-for-tat tariff battle with the U.S. has brought Australia’s relationship with the former into sharp focus as it remains the country’s single biggest trade partner. Australia was one of the first to cut ties with telecoms giant Huawei last year due to security concerns and has generally taken a harder stance against Chinese enterprises.

“We would hope that as an ally and a friend, we could encourage sense and reason on all sides. But at the end of the day, we will choose our security. If we have to make a choice, that’s the choice that we will make,” Mr. Costello said.

He added: “We would say that this is false choice. We would say that China was a great power, it is going to be if it is not already a great power, that it has a right to be a great power in the world and the most important thing is to see its rise as a re-assertion as a great power, done in a peaceful way.”

British historian and Hoover Institution fellow, Niall Ferguson also took to the stage at the AFR Business Summit and warned that a new “cold war” between the U.S. and China could develop in the coming years as the two countries vie to retain or become the world leader on various fronts.

Ferguson said this cold war appears inevitable, even though close allies and interested third parties across the globe may not want it, as it is “implicit” in many of the policies that the world’s two foremost economic superpowers are pursuing.