Australian shares ended near a two-month high on Wednesday, with gains led by gold and mining stocks as iron ore prices rose on hopes of China easing its COVID-19 restrictions.

The benchmark S&P/ASX 200 index gained for the fourth straight session, closing 0.6% higher at 6,999.3. It closed 0.4% firmer on Tuesday.

Dalian iron ore prices climbed to their highest in two weeks on Tuesday on hopes that China would ease its COVID-19 restrictions, despite worries about a surge in new infections in some Chinese cities and weak steel demand.

"I think commodities and hard assets are really going to do exceptionally well for the balance of the year," said Brad Smoling, managing director at Smoling Stockbroking.

Smoling said the benchmark index is likely set for a "very strong rally" for the rest of the year.

Heavyweight mining stocks climbed 2.7% to hit their highest in over two months.

Shares of Rio Tinto, BHP Group, and Fortescue Metals advanced between 2.1% and 3.1%.

Gold stocks gained as much as 7.4% with prices hovering near one-month peak, while investors waited for U.S. inflation data due on Thursday.

Newcrest Mining and Northern Star Resources climbed 6.8% and 7%, respectively.

The energy index fell 0.1% on lower oil prices and after coal producer Whitehaven Coal flagged lower production for this fiscal due to floods in New South Wales state, which cut access to its open-cut mines.

Shares of Whitehaven Coal were down 8.4%, marking their worst day in over a month.

Financials gained 0.2%, with three of the "Big Four" Banks rising between 0.3% and 0.6%.

However, National Australia Bank, the country's second largest lender, fell 0.9%, after it warned of slowing credit demand amid rising interest rates, turning it the top loser on the bourse.

New Zealand's benchmark S&P/NZX 50 index fell 0.1% to finish the session at 11,143.48. (Reporting by Echha Jain in Bengaluru; Editing by Dhanya Ann Thoppil)