* Ampol to work with Tesla on virtual power plant

* Working with Fusion Fuel Green on hydrogen plant

* Ampol to test hydrogen in microgeneration to replace diesel

MELBOURNE, May 20 (Reuters) - Australia's biggest fuel supplier, Ampol Ltd, said on Thursday it would invest at least A$100 million ($77 million) on developing new fuels over the next five years, including green hydrogen and increased electric vehicle charging.

Ampol outlined its decarbonisation strategy after securing a lifeline from the Australian government on Monday worth up to A$1.1 billion over nine years, protecting it from refining losses and helping it upgrade its Lytton refinery.

The company's green strategy includes plans to reach net zero carbon emissions at its operations by 2040. However its own operations account for only 2% of its total carbon footprint, with its customers' use of its products making up 98%.

Ampol Chief Executive Matt Halliday said the company had a strong competitive advantage to be able to develop new energy opportunities to help its 3 million retail customers and 80,000 business customers cut carbon emissions.

"We needed to do this. This is responding to a strategic issue around the energy transition and the role Ampol plays," Halliday told Reuters.

Ampol said it would work with Tesla Inc to trial electricity production, initially setting up solar panels and Tesla batteries at three of its petrol stations.

It also plans to work with Fusion Fuel Green plc to test a green hydrogen production plant at Lytton in Queensland, and work with an early-stage Australian developer of hydrogen-based microgeneration and storage technology.

The hydrogen production test will be very small, producing 1.5 tonnes of hydrogen from 10 units a year to see if the technology can beat the cost of conventional hydrogen production. Lytton already produces 30 tonnes a day of hydrogen from the oil product naphtha.

Ampol still expects oil-based fuels to play a major role in Australia's energy mix at least to 2030, due to the country's size, relatively small population and heavy reliance on long haul transport and heavy industry, Halliday said.

"That does create some greater challenges, but it means that the market demand and almost the necessity to develop hydrogen solutions in the longer term is going to be important," Halliday said.

($1 = 1.2947 Australian dollars) (Reporting by Sonali Paul in Melbourne; Additional reporting by Anushka Trivedi in Bengaluru; Editing by Shailesh Kuber and Richard Pullin)