What a difference a year has made for the world's biggest miner.
BHP Billiton has swung from loss to profit for the first half of the 2017 financial year thanks to a surge in commodity prices.
The multinational made a net profit of $US3.2 billion ($4.2 billion) for the six months to the end of December.
That's compared to a $7.84 billion loss for the first half of 2016 because of huge write-downs and lower commodity prices.
Underlying attributable profit was just below market forecasts at $4.22 billion although it was in line with forecasts by resources analysts at UBS.
Investors get a dividend payout of $0.52 a share, up by 150 per cent from 2016's $0.22 a share, better than analysts predicted.
Last year's result was marred by slumping commodity prices, Oil, coal and iron ore were in the doldrums.
But huge rises in coal and iron ore prices — because of higher demand in China thanks to policy changes, including production cuts at Chinese mines — saw earnings surge.
Revenue jumped by 20 per cent to more than $24 billion thanks to higher iron ore, coal and oil prices.
CEO positive on long-term outlook
BHP Billiton chief executive Andrew Mackenzie said big productivity savings and stronger prices had shaped the result.
"This is a strong result that follows several years of a considered and deliberate approach to improve productivity and redesign our portfolio and operating model," Mr Mackenzie said.
"We are confident in the long-term outlook for commodities, particularly oil, with markets expected to rebalance in the near term, and copper, where we expect a deficit to emerge in the early 2020s."
Coking coal prices have jumped from around $US75 a tonne in early 2016 to above $US300 a tonne in late 2016.
Iron ore prices have more than doubled over the past year to above $US90 a tonne.
Oil prices jumped from a low of below $US27 a barrel a year ago to around $US56.00 a barrel now after major producers agreed to supply cuts.
BHP Billiton was also hit in 2016 by massive pre-tax write-downs of nearly $11 billion after it wrote down the value of its onshore oil and gas fields in the US to the tune of $9.4 billion and $1.53 billion for the ongoing cost of the Samarco mine disaster in Brazil.
This time around, BHP made a $195 million loss for the half year relating to Samarco.
The miner and partner Vale have agreed to an end-of-June deadline to settle a $62 billion civil compensation claim by Brazil's federal prosecutor.
BHP Billiton's share price has increased by nearly 7 per cent over the year.
Its shares closed at $26.73, up 1 per cent, ahead of the results.
Rival Rio Tinto returned to profit for the full year, making a net profit of $6 billion after a loss in 2015 thanks to higher commodity prices and asset sales.
BHP's spin off, South 32, also made a $809 million profit on the back of higher commodity prices.