* Aussie benchmark snaps two days of losses
* Energy stocks gain the most
* Gold stocks extend losses to a fourth straight session (Updates to close)
Jan 24 (Reuters) - Australian shares ended higher on Thursday, led by energy stocks after Santos posted strong annual production and gave stellar 2019 guidance, though gains were capped by worries about weakening global economic growth.
The S&P/ASX 200 index .AXJO closed up 0.4 percent or 22 points at 5,865.700. The benchmark fell 0.3 percent on Wednesday.
The country's No.2 independent gas producer Santos Ltd STO.AX , rallied 3.9 percent to close at its highest since November last year after it said its quarterly revenue rose 22 percent and expects 2019 production to rise by up to 32 percent. surge helped boost the energy index .AXEJ 2.1 percent, even as oil prices declined amid lingering concerns over slowing global growth that may weigh on fuel demand. O/R
Aussie financial stocks .AXFJ edged up 0.5 percent, with index heavyweight Macquarie Group Ltd MQG.AX climbing 1.4 percent. Macquaire snapped three consecutive sessions of losses.
However, uncertainty over the partial U.S. government shutdown, global growth and the yet-unresolved trade standoff between the United States and China capped gains.
The metals and mining index .AXMM extended its losing run to four days, shedding 0.3 percent.
The world's biggest miner BHP Group BHP.AX dipped to its lowest close in nearly three weeks, while South32 Ltd S32.AX fell 0.9 percent.
Gold stocks lost the most, sliding 2.3 percent with Northern Star Resources Ltd NST.AX dropping 5.4 percent, while St Barbara Ltd SBM.AX lost 4.7 percent.
New Zealand's benchmark S&P/NZX 50 index .NZ50 closed flat or up 2.88 points to finish the session at 9,108.91.
Fuel distributor Z Energy Ltd ZEL.NZ and telecommunication and digital services supplier Spark New Zealand Ltd SPK.NZ were amongst the top percentage gainers, jumping 2 percent and 2.7 percent, respectively.