SYDNEY, AAP – Energy and building materials suppliers were the biggest beneficiaries of a broad-based rally on the ASX.

Energy shares were up 2.51 per cent after oil prices remained elevated.

Materials shares were better by almost two per cent, helped by strong demand for iron ore.

Market giant BHP gained 2.82 per cent to $51.30 and was just shy of a record price.

The miner will supply nickel from Western Australia to Elon Musk’s electric car manufacturer, Tesla.

The benchmark S&P/ASX200 index was higher by 63.8 points, or 0.87 per cent, to 7372.5 at 1200 AEST on Thursday.

The All Ordinaries was up 66 points, or 0.87 per cent, to 7646.9.

More strong corporate earnings reports helped US markets close higher earlier.

All three major indices closed within one per cent of their record closing highs.

Coca-Cola stocks rose after the company raised its full-year forecast.

Netflix reported slowing subscriber growth, sending its shares down.

Australia’s goods trade surplus hit a new peak due to record demand for iron ore.

Increased exports of metalliferous ores, coal, non-monetary gold and gas helped the surplus of $13.3 billion for June.

Meanwhile, NSW recorded 124 coronavirus infections in the past day as millions of people in the state remain in lockdown.

Victorians and South Australians, also under stay-at-home orders, had 26 and two infections respectively.

On the ASX, Lynas Rare Earths revealed it won a $14.8 million federal grant.

Lynas will commercialise a carbonate refining process.

The company aims to supply a proposed US rare earth processing plant.

Shares were up 7.82 per cent to $6.34.

AGL companies will report their progress in reducing carbon emissions following sustained shareholder pressure.

AGL said its two proposed demerged companies would give investors a say on climate reporting at their 2022 annual general meetings.

AGL Energy chair Peter Botten said progress in meeting decarbonisation targets would be published, as well as climate change roadmaps.

Shares were down 0.06 per cent to $7.90.

Among the energy providers doing well was Santos.

The company raised its full-year production guidance and mostly met market expectations of its second-quarter results.

Shares were up 3.04 per cent to $6.77.

The big banks were higher.

The Commonwealth was best of the big four and gained 1.01 per cent to $99.42.

The Australian dollar was buying 73.49 US cents at 1200 AEST, up from 72.98 US cents at Wednesday’s close.