New Zealand said it would buy four submarine-hunting surveillance jets, the country’s biggest military purchase in decades, as it seeks to counter a Chinese buildup in the Pacific that has worried the U.S. and its allies.

New Zealand’s government on Monday approved the $1.5 billion purchase of Boeing Co. P-8A Poseidons used by the U.S. and its military allies including the U.K., Australia and South Korea.

“We...