Sept 29 (Reuters) - Copper prices rose on Friday but were set for a flat quarter on the back of two straight months of decline, as rising inventories and a dollar rally cancelled out gains in July.

Three-month copper on the London Metal Exchange (LME) rose 1.2% to $8,316 per metric ton by 0809 GMT.

For the month, the contract was down 1.3% so far after falling 4.6% in August, which largely offset a 6.2% jump in July.

LME copper inventories leaped 141% so far this quarter to 167,825 tons, the biggest quarterly increase in 18 years.

Meanwhile, the dollar index rose 2.7% so far this quarter, on track for its best quarterly performance in a year. A firm dollar makes greenback-priced metals more expensive to holders of other currencies.

Weaker-than-expected economic recovery in China also dented metals demand outlook.

"Its property market remains a drag while some other sectors have done well. Unexciting local financial markets suggest that doubts remain about the sustainability of the recovery," said Sandeep Daga, a director at metals analysis company Metal Intelligence Centre, in a note.

"The rally in metal prices in the last 36 hours should be seen as a unwinding of "excessive" bearishness about China. Prices may stall after the enthusiastic bears exit. However, this bounce should not be construed as the beginning of a bull trend," he added.

The Shanghai Futures Exchange was closed for public holidays and will reopen on Oct. 9.

LME zinc is on track for its best quarterly performance since the first quarter of 2022, up 11% so far.

LME lead rebounded 4.4% so far this quarter, following two quarters of decline.

LME nickel was on track for the third straight quarter of decline. It is the worst performer of all LME base metals, down 37% year-to-date.

LME tin is set for its first quarterly drop in a year because of a big fall in August, but the metal posted the smallest fall across all LME base metals so far this year, down 0.6%.

For the top stories in metals and other news, click or (Reporting by Mai Nguyen in Hanoi; editing by Eileen Soreng and Varun H K)