BHP Billiton reported a record second-half profit driven largely by iron ore, but just missed market forecasts and sounded a warning over costs and longer-term demand.

The global miner also sought to appease investors with a big hike in its dividend.

BHP, the last of the major miners to report results, was confident on the outlook for commodity prices despite expecting weak growth in Europe and the United States.

We expect robust demand in the short and medium term, supported by commodities intensive emerging economic growth, the company said.

However, it joined its peers in warning costs were rapidly rising.

In the current environment, tight labor and raw material markets are presenting a challenge for all operators, and BHP Billiton is not immune from that trend, the company said.

It raised its dividend by 22 percent, which it said reflected its confidence in the long term outlook for our core commodity markets, after completing a $10 billion share buyback earlier than planned.

Investors had been divided over whether to expect another buyback following BHP's recent $12.1 billion bid for U.S. shale gas producer Petrohawk Energy, its biggest successful deal since BHP took over Billiton Plc.

Soaring prices for iron ore, copper and oil boosted attributable profit before exceptional items to $10.98 billion for the six months to June from $6.77 billion a year ago, missing an average forecast of $11.7 billion, according to Thomson Reuters I/B/E/S.

Earnings from iron ore, its biggest division, jumped 122 percent to $13.3 billion, while earnings for base metals soared 47 percent and petroleum earnings grew 38 percent.

It said inflation and the falling U.S. dollar cut underlying earnings by $3.2 billion.

BHP's shares have fallen 16 percent so far this year on worries about global growth, underperforming the broader market's <.AXJO> 14 percent drop. The miner's shares ended flat at A$38.21, shortly after the result was released, in line with the market.

(Reporting by Sonali Paul; Editing by Ed Davies)