The appearance of three Chinese naval vessels firing live rounds in the Tasman Sea has caused understandable alarm in New Zealand and Australia. But this has more to do with the geopolitical context than the actual event.In fact, the Chinese navy is allowed to conduct exercises in the Tasman and has wide freedoms on the high seas in general. So far, China appears to be acting in accordance with both the United Nations Convention on the Law of the Sea and the Code for Unplanned Encounters at Sea.While New Zealand would have preferred more notice of the Chinese navy’s intentions, there was no obligation to provide this.Nor is what is occurring in the Tasman similar to the more aggressive sabre-rattling the Chinese military has displayed around the South China Sea, most recently involving both the Australian and Philippine navies.And in September last year, just a few days after Australian and New Zealand vessels sailed through the Taiwan Strait, the Chinese test-fired a nuclear-capable intercontinental missile into the South Pacific.For China, of course, Taiwan and parts of the South China Sea are highly disputed territory. The Tasman Sea is not. But what is disputed is China’s role and influence in the Pacific – and this, rather than a minor naval exercise, is what is causing headaches in Canberra and Wellington.The Cook Islands factorThe surprise agreement signed by the Cook Islands and China under a fortnight ago, aimed at “deepening blue economy cooperation”, is the immediate context for that concern.The deal avoids controversial areas such as security and policing. But it moves Chinese influence into infrastructure support for wharves, shipbuilding and repair, and ocean transportation.What really challenges New Zealand’s foreign policy is how this opens the South Pacific up to even greater Chinese influence and activity. Foreign Minister Winston Peters has signalled it is time to reset the relationship with the Cooks.For its part, China has asserted that its relationship with the Cook Islands “is not directed against any third party and should not be subject to or disrupted by any third party”.In other words, China has told New Zealand to butt out of a major development in the historically close diplomatic and political relationship with its Pacific neighbour.A Chinese own goal?All of this is happening within a rapidly shifting geopolitical sphere. US President Donald Trump is unilaterally attempting to upend the old US-led world order, and other major powers such as Russia and China are adapting.New Zealand’s relations with China were already difficult. The Security Intelligence Service and Government Communications Security Bureau have both identified state-sponsored Chinese interference in domestic affairs, breaches of the parliamentary network and other malicious cyber activity.The question now is whether China has scored an own goal with its recent actions. Because while it might prefer New Zealand to operate a more independent foreign policy – balancing its relations with east and west – the opposite may now be more likely.In times of international stress and uncertainty, New Zealand has always tended to move towards deepening relationships with traditional allies.Whether it is the fear of Russian invasion in the 19th century, or Japanese invasion in the 20th century – and whether or not those threats are real or imagined – New Zealand reverts to form.It has been this way for nearly 150 years and is likely to occur again. New Zealand is already grappling with how to respond to the Trump administration’s redrawn global system and will be looking for ways to deepen the friendship.At the same time, the government now seems committed to joining a new arms race and increasing defence spending as a proportion of GDP. And the supposed benefits of joining the second tier of the AUKUS security pact may now become that much easier to sell politically.Alexander Gillespie does not work for, consult, own shares in or receive funding from any company or organisation that would benefit from this article, and has disclosed no relevant affiliations beyond their academic appointment.