Australia banned Chinese telecom firms Huawei Technologies Co. and ZTE Corp. from its next-generation 5G mobile network, aligning it with U.S. policy on the matter and underscoring concerns about the possibility of cyberspying by Beijing.

The Australian government said Thursday that companies that are “likely to be subject to extrajudicial directions from a foreign government that conflict with Australian law” wouldn’t be able to guarantee security of the network. The statement didn’t specifically mention Chinese companies,...