* AGL's underlying profit A$281 mln, upper end of guidance range

* Final dividend of 23 cents per share vs 10 cents year ago

* Shares down 4% after rising initially

Aug 10 (Reuters) - AGL Energy's underlying annual profit jumped by a quarter, in line with its guidance, as Australia's biggest power producer said it benefited from fewer unplanned outages and higher wholesale prices, which it expected to remain into 2025.

The result showed the company finally emerging from a series of setbacks that included unplanned outages, wholesale market volatility and boardroom instability which killed a demerger plan. Under new leadership, the country's biggest carbon emitter said it can go 100% renewable by 2035 while growing profit.

Underlying annual profit for the supplier of energy to one-sixth of Australians was A$281 million ($184 million), within the A$255 million to A$285 million range it forecast in June. It stuck to guidance for fiscal 2024 of underlying profit between A$580 million and A$780 million but added energy prices looked set to remain high into 2025.

"FY24 guidance as well as comments around wholesale pricing for FY25 is encouraging for medium term earnings," Jefferies analysts said in a note.

Shares of AGL reversed early gains and were trading 4% lower by midsession, against a flat overall market, as investors cashed in on a stock that has surged 42% this year compared with a 4% gain on the main index.

The underlying result did not include charges previously flagged by the company related to an accelerated exit from thermal coal assets. Including those charges, the company posted a net loss of A$1.26 billion, versus a profit of A$860 million a year ago.

Australia's energy suppliers including AGL have faced criticism for increasing retail prices by up to 30% from July, but CEO Damien Nicks said the company's decision to pay less of its profit as dividends would enable it to fund renewable projects, driving down prices in the future.

"At the end of the day, the way to drive down prices over the longer term will be building out renewables in this market," Nicks told Reuters in an interview, referring to a previous decision to lower the company's dividend payout ratio from 2024.

Pre-tax profit from AGL's 'customer markets' unit rose 16%, faster than the 12% increase in pre-tax profit from its wholesale division.

AGL has said it plans to spend up to A$20 billion on renewable energy by 2036. On Thursday it said it had increased its renewable generation development pipeline by 60% over the past six months to 5.3 gigawatts. ($1 = 1.5281 Australian dollars) (Reporting by Byron Kaye in Sydneyt and Nausheen Thusoo and Archishma Iyer in Bengaluru; Editing by Anil D'Silva, Sherry Jacob-Phillips and Muralikumar Anantharaman)