During Prime Minister John Key's visit to Beijing last month, an editorial was published by the state-owned news agency, Xinhua, criticising New Zealand for participating in the Bersama Shield naval exercises in the South China Sea.
The participants - United States, United Kingdom, Australia, Singapore, Malaysia and New Zealand - claimed that the purpose of the exercises was to improve their readiness to protect shipping lanes in the region.
The United States was primarily asserting its power in the region. The Xinhua editorial noted that countries such as New Zealand that depended on trade with China should match their rhetoric of non-interference in China's territorial disputes with their actions, or face possible economic ramifications.
China is building bases on reefs and rocks in the South China Sea to reinforce its territorial claims, which extend as far south as Borneo, grazing the coasts of all the countries to the east and west.
These countries protest that China is compromising their territorial integrity, while China claims that it is simply redefining territory taken from it in the colonial era and acknowledging territorial waters commensurate with its land mass.
China's actions have created regional political tensions and prompted increasingly strong reactions from Washington. Beijing's insistence that other countries do not take sides in its disputes with its South East Asian neighbours or support what it perceives as United States hegemony has forced those outside the region, such as New Zealand and Australia, to weigh vital economic interests with the strategic demands of their traditional ally, the United States.
As an advisor on the issue to Chinese Government noted:
"We respect loyalty to old friends, but New Zealand should understand that China cannot ignore Washington's wish to counter China's growing influence in the region. We may have taken a different approach had the United States not supported Japan's reversal of its pacifist constitutional principles and subsequent rearmament. Manoeuvres in the South China Sea and continued American military presence in Japan and on the Korean Peninsula are all aimed at containing China.
"America would not tolerate the presence of a foreign power conducting constant manoeuvres and surveillance off the coast of Hawaii, so it should not expect us to accept American naval patrols so close to our coastline. The Cold War is over. We need a new compromise that reflects the times."
There is little sign that the United States and China will find a compromise soon, but the strategic tensions between them are tempered somewhat by the extent each economy depends upon the other.
The situation is unlikely to result in military confrontation, but China and the United States' vying for position in Asia is squandering a great deal of political and military capital.
Should countries with larger navies such as Australia join the United States in patrolling the fringes of China's northern and eastern territorial waters, the economic consequences could be dire.
Beijing can easily implement subtle and non-tariff punitive economic measures against countries that participate in the United States' China containment strategy.
A strategist from a Chinese think tank commented:
"It was disappointing that New Zealand said one thing regarding the South China Sea issue but did another. China does not perceive New Zealand to be a captive to US foreign policy like Australia, but this would change should New Zealand become a more active participant in American military exercises."
New Zealand has had a long and trusting relationship with China, earning considerable respect over the last 20 years as a result of its relatively independent foreign policies.
New Zealand believed that China had adhered to the terms of the Hong Kong handover in 1997, and so was one of the first nations to recognise the new Hong Kong Government. This incurred the ire of Britain and the United States, as did New Zealand's decision not to join the invasion of Iraq in 2003.
New Zealand does not face an imminent risk from its perceived role in China's containment, but it is on notice.
Acting on principle and without seeking commercial benefit in both cases, New Zealand stood firm.
New Zealand should stand equally firm if Chinese actions contradicted its principles.
It is a matter not of New Zealand ingratiating itself with China out of fear of losing economic favour, but a need for New Zealand to maintain integrity in the region through its independence of foreign policy and relative non-alignment.
If China focused on expanding its economic presence in the region, it would probably achieve its objective of securing a degree of influence, security and national pride more effectively and without alarming its neighbours.
Having taken such a bold stance with its base-building, China now cannot back down, but having made its strategic point, it is unlikely that China will expand its South China Sea bases much more in the coming years. China's need for regional economic harmony cannot be underestimated.
The Qing Emperors believed the West could not afford to fight China as the West had become too dependent upon Chinese tea and, bafflingly, rhubarb. The Opium Wars proved China tragically wrong. Today the roles have reversed in that few single countries, other than the United States, are important to the Chinese economy. China has the wealth and global networks to reduce imports from countries like New Zealand and Australia and to buy elsewhere, and the administrative means to marginalise the aspirations of foreign companies in its borders in response to anti-Chinese alliances. New Zealand does not face an imminent risk from its perceived role in China's containment, but it is on notice.
• David Mahon heads Mahon China which has been based on the mainland since 1985 as an investment manager and corporate advisor for foreign companies.
Key has Xi's trust
Despite some political tension, Prime Minister John Key's recent mission to China was a success. Expectations that the New Zealand- China Free Trade Agreement will be upgraded soon are probably optimistic, but the delegation signed significant deals, such as the agreement between online retailer Alibaba and New Zealand Trade and Enterprise.
New Zealand has benefited from a decade of preferential trade access to China, but with the exception of Fonterra, Zespri and Les Mills, few companies have established a significant commercial presence in the domestic Chinese market.
Chinese authorities see New Zealand companies as often being reluctant to engage much beyond shipping goods to Chinese ports.
John Key does appear to have President Xi Jinping's trust and respect, and New Zealand's increased government engagement with China has brought good results.