Falling prices for dairy and forest product exports drove the trade balance into the red last month.
Imports exceeded exports by $672 million or 19 per cent, reversing the trade surpluses recorded in the previous five July months.
The deficit was bigger than market expectations of $475 million, even though it was flattered by the exclusion of "certain import items for confidentiality reasons".
"We had expected to see the first of Air New Zealand's new Boeing 787 Dreamliners, worth up to $200 million, in the July trade data," ASB economist Nathan Penny said.
On a seasonally adjusted basis, exports of dairy products were down 8.7 per cent from June, reflecting a 4 per cent drop in volumes as well as lower prices.
Compared with July last year dairy exports were flat, despite an 8 per cent rise in the value of the New Zealand dollar since then.
Forest product exports were down 0.3 per cent on June, despite a 5 per cent increase in the amount shipped, and 15 per cent down on July last year.
Imports of plant and machinery last month were 12.4 per cent below July last year, consumer goods were flat (up 0.3 per cent) but imports of cars were up 24.6 per cent.