* Benchmark snaps three sessions of weekly gains
* Healthscope soars after takeover offer
* Mining stocks rally for fifth straight session (Updates to close)
Feb 1 (Reuters) - Australian shares ended flat on Friday as gains in miners, on the back of stronger commodities prices and renewed confidence in the outcome of U.S.-China talks, were offset by losses in energy and financial stocks.
The S&P/ASX 200 index .AXJO ended flat at 5,862.80, after declining 0.4 percent on Thursday. The benchmark snapped three sessions of weekly gains to end the week 0.7 percent lower.
Mining stocks .AXMM rallied for a fifth straight session, adding 6.5 percent at the end of the week.
U.S. President Donald Trump on Thursday said he would meet with Chinese President Xi Jinping to secure a trade deal, with both sides committing to bring an end to the months-long trade war that has battered equities globally.
China is the top buyer of Australian commodities exports and developments there can immensely affect local markets.
The world's biggest miner BHP Group BHP.AX advanced 0.5 percent while rival Rio Tinto (LON:RIO) RIO.AX gained 0.6 percent.
Meanwhile, hospital operator Healthscope Ltd HSO.AX soared to an eight-month high in the session after saying it would proceed with a A$4.18 billion ($3.03 billion) takeover offer from Canadian investment firm Brookfield Asset Management BAMa.TO
However, financial stocks .AXFJ were subdued ahead of a looming final royal commission report due Monday that is expected to bring widespread regulatory changes in the sector.
Australia and New Zealand Bank ANZ.AX shed 0.4 percent, and the country's top lender Commonwealth Bank of Australia CBA.AX dropped 0.2 percent.
Energy stocks .AXEJ inched 0.9 percent lower and also pressured the benchmark, with Woodside Petroleum Ltd WPL.AX losing 1.3 percent and was the top decliner on the sub-index.
Across the Tasman sea, New Zealand's benchmark S&P/NZX 50 index .NZ50 rose 0.15 percent or 13.83 points to finish the session at 8,999.17.
Leading the gains on the kiwi benchmark were retailer Kathmandu Holdings Ltd KMD.NZ which added 2.5 pct, while electricity generator Meridian Energy MEL.NZ rose 2.3 percent.
($1 = 1.3816 Australian dollars)