* Mining, energy stocks rise on bargain-hunting
* China resumes higher
* Bank of Queensland up sharply on record profit (Adds analysis, quotes, stocks on the move)
SYDNEY/WELLINGTON, Oct 8 (Reuters) - Australian shares rose to a 5-1/2 week high on Thursday as investors took heart from gains on Wall St and sought bargains in mining and energy stocks following months of heavy selling.
A three percent gain on China's mainland stock markets .SSEC as they resumed trading after a week-long break also helped boost Australian shares.
The S&P/ASX 200 index .AXJO rose 0.3 percent or 16.3 points to 5,204.2 by 0145 GMT, its fourth consecutive day of gains and touching its highest intraday level since Aug. 31. The index is still down about 4 percent for the year so far.
"It appears that we've got a bit of a virtuous circle going," said CMC Markets chief strategist Michael McCarthy.
"The calmer market is lifting confidence, which brings buying, and that buying lifts the market and calms (investors), which in turn brings more confidence."
Miners rose as investors sought to buy on the cheap in a sector which has been heavily battered in 2015 as a result of slowing China demand and tumbling commodity prices. BHP Billiton (LONDON:BLT) BHP.AX added 3 percent, rival Rio Tinto (LONDON:RIO) RIO.AX firmed 1.6 percent and BHP spin-off South32 S32.AX jumped 6 percent on bouncing commodities prices.
Energy companies, which also have followed the oil price lower this year, rebounded. Origin Energy ORG.AX added 3.3 percent, Santos STO.AX rallied 5 percent and Papua New Guinea-focused takeover target Oil Search OSH.AX nudged up 0.3 percent.
Regional lender Bank of Queensland BOQ.AX led financials higher, up nearly 7 percent after reporting a record full year profit.
Australia and New Zealand Banking Group ANZ.AX gained 1.3 percent after selling its car finance unit to Macquarie Group MQG.AX , which was on a trading halt.
Among retailers, No. 1 grocer Woolworths WOW.AX was up 1 percent while rival Wesfarmers WES.AX , owner of Woolworths rival Coles, fell about the same amount.
New Zealand's benchmark NZX 50 index rose 0.3 percent or 18.02 points to 5,568.05, taking its gains to 1.3 percent so far this week.
Technology and infrastructure stocks were the biggest gainers. Software developer Xero XRO.NZ rose 3 percent to an eight-week peak, having bounced 33 percent since late August.
Air New Zealand jumped 2.7 percent to its highest since late August after the company said it expected to almost double pre-tax profit in the first half of the 2015-16 financial year.
Resins manufacturer Nuplex Industries dropped nearly 1 percent after running into profit taking.