New Zealand said on Monday it had agreed to buy four Boeing P-8A Poseidon maritime surveillance aircraft through the United States government.