Defence Minister Gerry Brownlee says there is nothing provocative in New Zealand taking part in a military exercise in the South China Sea when the Prime Minister is in China.
While he said exactly where it was happening was classified, it would not be taking place in any of the sea disputed by China.
The exercise, Bersama Shield, will be hosted by Malaysia, which is one of many countries in dispute with China over territory in the South China Sea.
It will simulate a situation in which Malaysia and Singapore are under threat by an unnamed force.
But Mr Brownlee said China knew about the exercise and would be one of several countries taking part in another exercise, Asean Plus, in Brunei and Singapore following the Malaysian exercise.
Mr Key is leaving for a week-long trip to China on Sunday and Australian Prime Minister Malcolm Turnbull is there this week.
The maritime exercise will be among countries in the Five Power Defence Arrangement - Australia, New Zealand, Malaysia, Singapore and Britain - and will be held in the South China Sea, Malaysia, Brunei, Singapore from April 17 to 29.
Mr Brownlee said: "New Zealand Defence Forces will not be exercising or transiting through disputed territory."
"The South China Sea is huge. It's like the Tasman.
The precise location of the exercise was "somewhat classified". "But I can assure you it is not taking place in disputed sea or air space."
Asked by the Herald, he did not think the timing was provocative.
"This is something we have done for 35 years and then what immediately follows is an [Asean Plus] exercise which involves China."
New Zealand will be contributing a P-3K2 Orion surveillance aircraft and up to 38 personnel to Bersama Shield, according to Major General Tim Gall, the New Zealand Commander of Joint Forces.
"Our participation provides an opportunity to enhance our ability to operate alongside partner nations in Southeast Asia as our people will be conducting operations in a multinational environment," he said. "It also reflects our long term engagement in the region."
The Five Power Defence Arrangement was established in 1971.
The Bersama Shield exercise will involve more than 2000 personnel, four ships and about 50 aircraft.
Australian Prime Minister Malcolm Turnbull is making his first visit to Beijing as Prime Minister this week as well.