* RBA hikes cash rate by 50 bps to 1.35%

* Benchmark index extends gains

* Gold stocks lead advance

July 5 (Reuters) - Australian shares closed higher on Tuesday, lifted by commodity stocks, while the Reserve Bank of Australia raised its cash rate by 50 basis points (bps) and offered a less hawkish view than what some investors had hoped for.

The country's central bank raised its cash rate for a third straight month to 1.35% and flagged more tightening ahead as it struggles to contain surging inflation.

The S&P/ASX 200 index rose 0.3% to 6,629.30 at the close of trade, extending its gain from Monday's 1.1% rise.

"Today's 50 bps (hike) was in line with expectations and with quarterly inflation numbers out this month, there is a case for more rises coming in July and August," Peter Esho, co-founder at Wealthi, said.

Official data on consumer price inflation for the second quarter is due on July 27 and is expected to show another alarming rise to 6% or more — levels not seen since a national sales tax was introduced back in 2000.

"We're of the view that the cash rate will rise to around 2%-2.25% by the end of the year," he added.

Gold stocks led gains to close up 2.4%, tracking rise in gold prices. Sector heavyweights Northern Star Resources and Newcrest Mining climbed 2.4% and 1.35, respectively.

Energy stocks advanced 2.2% after concerns around tight supply of the commodity shadowed fears of a looming global recession.

Sector majors Woodside Energy Group and Ampol advanced 3.8% and 1.1%, respectively.

Financials erased losses to climb 0.3% after the central bank's announcement. However, shares of three of the so-called "Big Four" banks ended lower, while Westpac was flat.

New Zealand's benchmark S&P/NZX 50 index rose 0.9% to finish the session at 10,965.17 points. (Reporting by Tejaswi Marthi in Bengaluru; editing by Uttaresh.V)