A $1.1 billion drop in imported goods and 1.3% improvement in exports by value of $1.6bn saw the monthly trade balance move into a surplus of $8.8 million for June, according to Statistics New Zealand.
Exports of $6.3bn were led by a $170m increase in the value of milk powder, butter and cheese to $1.8bn while petroleum product imports were down $374m, or almost a third, with iron and machinery imports down $94m or 9.5% compared to the prior June.
That followed the $1.6bn rise in imports led by petrol and diesel imports last June, after the closure of the Marsden Point refinery operations in April last year.
That took goods exports to $72.8bn over the past year, up $5.5bn on the prior year but still leaving the annual trade deficit for the year to June at $16bn, up $5bn on the prior year.
The quarterly seasonally adjusted trade balance was a deficit of $2.7bn.
Exports into China were down 7.2%, or $124m, for the month on the back of a $81m fall in meat products and a $57m drop in fruit exports, and down $100m for exports into the European Union.
That was offset by a $190m increase in exports into Australia and a $91m improvement in goods shipped into the United States, which were up $91m.
Total imports from China, meanwhile, were down $232m, or 16%, with a $46m dip in fertiliser imports and a $33m drop in machinery and equipment making up the bulk of that.
A drop of $41m in vehicles and parts and a $28m dip in machinery, meanwhile, made up most of the $100m drop in EU imports.