Imports, however, continue to stumble and would have fallen more than 8 per cent to $4.2 billion if it wasn't for new naval vessel.
"The arrival of the navy's newest and biggest ship has buoyed import totals for June," international statistics manager Darren Allan said.
If that ship - the tanker and support vessel Aotearoa - is stripped out, the trade surplus would have been $821 million in June.
Cars, trucks
The biggest import decline in June was of vehicles and parts. Vehicle imports were down sharply in April and May due to the covid lockdown, and were still $256 million lower last month than in June 2019.
"The latest vehicle registration numbers indicate sales of vehicles may be recovering," Allan said. "Given the continued low imports of vehicles, it seems the car sales are of existing stock."
Imports of mechanical machinery and equipment, such as turbo-jet and turbo-propeller parts, were also down.
"With ongoing travel restrictions and international arrivals at a 61-year low, there's less need for imports of aircraft parts," Allan said.
Imports from China continued to hold up, lifting 10 per cent in June versus the same month a year ago.
The leading rises were electrical machinery and equipment, such as mobile phones, articles of plastic, such as disposable aprons, and textiles, such as face masks.
The annual trade deficit meanwhile was $1.2 million in June, the smallest since December 2014.
Exports during the past year lifted 1.4 per cent to $60.2 billion while imports fell 4.6 per cent to $61.4 billion.