In early 2018, in a complex of low-rise buildings in the Australian capital, a team of government hackers was engaging in a destructive digital war game.

The operatives — agents of the Australian Signals Directorate, the nation's top-secret eavesdropping agency — had been given a challenge. With all the offensive cyber tools at their disposal, what harm could they inflict if they had access to equipment installed in the 5G network, the next-generation mobile communications technology, of a target nation?

What the team found, say current and former government officials, was sobering for Australian security and political leaders: The offensive potential of 5G was so great that if Australia were on the receiving end of such attacks, the country could be seriously exposed. The understanding of how 5G could be exploited for spying and to sabotage critical infrastructure changed everything for the Australians, according to people familiar with the deliberations.