Australian shares give up early gains as miners, banks weigh

* Benchmark ends flat, set to snap five straight monthly gains

* Bank of Queensland top pct loser on AXJO

* NZ benchmark slips, a2 Milk extends falls (Updates to close)

Sept 29 (Reuters) - Australian shares gave up early gains to close flat on Tuesday, with miners and financials weighing the most, as investors closed positions at the end of the month while uncertainties surrounding the U.S. elections kept market sentiment in check.

The S&P/ASX 200 index closed little changed at 5,952.1, after rising 0.7% earlier in the day to hit its highest in nearly three weeks.

The benchmark looked set to post its first monthly drop in six but was up about 1% so far in the quarter.

“With the month-end going on, everyone is trying to lock in their performance, and on top of that there is uncertainty playing out with the upcoming elections in the United States,” said Mathan Somasundaram, chief executive officer of DeepData Analytics.

U.S. President Donald Trump and Democratic rival Joe Biden are set for their first debate of the 2020 presidential elections later in the day.

Heavyweight financials fell 0.4%, all Big Four lenders declined, with Commonwealth Bank of Australia and Westpac Banking Corp shedding 0.7% and 1.3%, respectively.

Bank of Queensland was the top loser, declining 7.2% after the Brisbane-based lender warned of a pre-tax loan impairment expense of A$175 million in its annual results, mostly due to the COVID-19 impact.

Miners, reliant on exports to China, were among the top drags, as political tensions between Australia and the world’s second-biggest economy weighed.

Global miners BHP Group and Rio Tinto declined 0.7% and 0.8%.

Gains in the energy and the industrials sectors capped the losses, with energy firms advancing 0.6%.

Across the Tasman Sea, New Zealand’s benchmark S&P/NZX 50 index slid 0.5% to 11,742.09.

Dairy firm a2 Milk Co extended losses into a second session, declining 4.9%, while NZ-listed shares of Westpac Banking Corp lost 0.7%. ($1 = 1.4122 Australian dollars) (Reporting by Sameer Manekar in Bengaluru; Editing by Subhranshu Sahu)