Australia’s trade surplus blew past expectations in June as exports to China boomed to their second-highest on record.

A report on Thursday from the Australian Bureau of Statistics (ABS) showed Australia’s trade surplus swelled by 158 per cent to $1.87 billion double the market forecast and the largest since May last year.

Exports climbed 2.6 per cent on a pick-up in a broad range of goods from iron ore and gold to farm and manufactured items, the data showed.

Imports fell 0.7 per cent as a pullback in petrol outweighed strength in transport and telecoms equipment.

The windfall owed much to China, which has been hoovering up Australia’s iron ore and coal output even as trade tensions with the United States have escalated.

Analysts noted that much of Australia’s exports to China are primary products used in the Asian nation’s domestic economy rather than for re-export.

There has also been no sign of a slowdown in the rapid growth of Chinese tourism or the flow of students from the country.

Indeed, exports of goods to China hit the second strongest on record in June at $10.34 billion, an increase of almost 40 per cent from the same month last year.

“US President Donald Trump would have few concerns with the US-Australia trade imbalance – it is in the US favour by $18 billion over 2017/18,” noted Craig James, chief economist at fund manager CommSec.

“By contrast Australia’s trade surplus with China stands at almost $38 billion.”

Liquefied natural gas sales to China and Japan have been a major growth area, with export earnings up 14 per cent in June alone at just over $4 billion.

Shipments are set to ramp up further as the giant Ichthys field off northern Australia has finally started producing after a long wave of delays.

The $40 billion project run by Inpex Corp is Japan’s biggest overseas investment.

One risk to exports is a drought currently ravaging large parts of the farm belt in Australia, which is likely to cut agricultural shipments later in the year.

For the whole of the June quarter, Australia’s trade surplus came in at a seasonally adjusted $2.9 billion, down modestly from the first quarter when a rebound in resource shipments flattered the accounts.

Much of that pullback looked to be due to changes in prices rather than volumes and thus not a drag on gross domestic growth (GDP), said Westpac senior economist Andrew Hanlan.

“Net exports are likely to be slightly positive in Q2, adding in the order of 0.1 percentage points to activity,” he estimated.

Analysts had thought trade – exports minus imports – would subtract from GDP in the second quarter given it had added a sizable 0.4 percentage points the quarter before.