The trade surplus was A$411 million ($387 million) compared with a revised deficit of A$253 million in May, the Bureau of Statistics said in Sydney today.
Today's report adds to evidence exports of raw materials will offset slowing domestic demand after central bank Governor Glenn Stevens increased the benchmark interest rate to a 12-year high in March. Export income is forecast to surge after mining companies including Rio Tinto Group negotiated a price increase of as much as 97 percent for iron ore destined for China.
Prior to April, Australia recorded 74 straight monthly trade deficits as imports outpaced exports that were hampered by a drought and bottlenecks at ports.
Exports rose 2 percent to A$23 billion in June from May, today's report showed. Coal shipments jumped 21 percent and mineral fuels gained 5 percent. Meat exports increased 8 percent.
Imports fell 1 percent to A$22.6 billion. Non-industrial transport equipment dropped 12 percent.
The Australian dollar slipped to 94.37 U.S. cents at 12:17 p.m. in Sydney from 94.47 cents before the figures were released. The two-year government bond yield fell 7 basis points to 6.3 percent from yesterday. A basis point is 0.01 percentage point.
The central bank forecasts the mining boom will boost Australia's terms of trade, a measure of export earnings, by 20 percent this year after prices for iron ore, coal and other commodities surged to a record.