Last year, Tesla built what is essentially the world’s biggest battery in Australia, and now the company is again partnering with the South Australian government to build the world’s largest “virtual power plant.” By installing solar panels and Tesla Powerwall batteries on thousands of houses, the proposed system would allow homes to generate their own electricity and feed it back into the state’s power grid when needed.

Blackouts ravaged the state of South Australia through the summer of 2016, leading the state government to launch a plan to “take charge of the state’s energy future.” A key part of that plan was to build the world’s largest battery system to store energy gathered by South Australia’s extensive renewable sources. Tesla took up the challenge to build the facility with a series of Powerpacks, with Elon Musk offering to build it within 100 days or it’s free – and meeting the deadline.

Less than a month after the new battery system booted up, it proved its worth when it was able to inject 100 MW into the national grid to compensate for a fault at a major coal-fired plant. The Powerpacks were reportedly able to respond to the shortage in just 140 milliseconds – far, far quicker than the 10 to 15 minutes it would usually take for emergency generators to fire up.

The newly-announced system is also designed to keep the grid stable, by decentralizing electricity generation and storage. Over the next four years, the South Australian government is planning to install 5-kW rooftop solar panel systems coupled to 13.5-kWh Tesla Powerwall 2 batteries in over 50,000 homes.

The panels and batteries will be supplied and installed for free, but participants will still have to pay for the electricity they use, with economics analysis suggesting that participating households will save about 30 percent on their electricity bills. These homes will also be protected from blackouts. If the Powerwall detects a disruption in the grid, it will immediately restore power the house from its own reserves without interruption.

Not only will these allow homes to generate and store their own energy, but they will all come together to form what the government and Tesla are calling the world’s largest virtual power plant, with a capacity of 250 MW. Excess electricity from each home will be fed back into the main grid, or can be drawn on in an emergency.

The first trial for the virtual power plant is currently underway, with 1,100 Housing Trust properties receiving the solar panels and Powerwalls at no cost. After that, the systems will be installed at another 24,000 Housing Trust properties, before the offer is opened up to all South Australian households.