* Aussie shares end eight sessions of consecutive losses
* Banks and energy account for most of the gains
* CSL drags as shares trade ex-div
* NZ rises 2 pct on a2 Milk rally (Updates to close)
Sept 11 (Reuters) - Australian shares advanced on Tuesday, putting an end to eight consecutive days of losses as investors bought into beaten-down banks and as energy stocks firmed on higher oil prices.
The S&P/ASX 200 index rose 0.6 percent or 38 points to 6,179.7 at the close, after giving up 2.1 points on Monday.
Banks supported the mild recovery on the day, having lost about 3.5 percent in the past eight sessions versus broad market declines of about 3.4 percent in the same period.
Index heavyweight Commonwealth Bank of Australia firmed 1.6 percent and was the biggest boost to the benchmark, while investment bank Macquarie Group Ltd rose 1.8 percent.
Earlier in the day, Macquarie said it expects group’s fiscal year 2019 result to be broadly in line with fiscal 2018.
A jump in oil prices on looming U.S. sanctions against Iran boosted demand for local energy stocks which jumped 2.1 percent and supported the broader market.
New South Wales-based Whitehaven Coal Ltd was among the top gainers as it jumped 3.7 percent to a near four-week high, while Origin Energy Ltd rose 3.2 percent to its highest since August 29.
Elsewhere, healthcare stocks fell, capping the gains on the benchmark.
Shares of Drugmaker CSL Ltd, which were trading ex-dividend, fell 0.7 percent to a four-week low, while Australian shares of California-based Resmed slipped 0.8 percent.
Medical device maker Fisher & Paykel Healthcare said it had filed a patent infringement complaint against Resmed, alleging it infringed five of its patents related to sleep apnea devices.
In New Zealand, the benchmark S&P/NZX 50 index rose about 2 percent or 176.940 points to finish the session at 9.225.57.
Dairy firm a2 Milk Company Ltd accounted for most of the gains as it surged 4.9 percent, while teleco Spark New Zealand Ltd firmed 3.6 percent to its highest in more than twelve years.
Reporting by Aditya Soni in Bengaluru Editing by Shri Navaratnam