Tesla has entered a partnership with an Australian state to build the world’s biggest battery.

The lithium-ion battery will be made up of Tesla’s industrial-scale Powerpacks and serve as a storage system for the power grid of South Australia. The total capacity will be 129 megawatt-hours, or the equivalent of 1,290 Tesla Model S P100Ds.

The South Australian government was prompted to find an energy storage solution after a series of blackouts in late 2016 left more than 1.7 million residents without power for extended periods. Tesla responded in March with the promise it could install between 100 and 300 megawatt-hours of capacity within 100 days of receiving a contract.

On Thursday, a day after the Insurance Institute for Highway Safety revealed that the Model S had fallen short in a critical crash test, Tesla said it was awarded the contract by the South Australian government for the supply of the battery. Neoen, a French energy company with a windfarm near the South Australian town of Jamestown, was awarded the contract to supply the energy to be stored in the battery.

Upon completion by December 2017, this battery will be the largest electrical energy storage system in the world and be able to provide enough power for more than 30,000 homes at peak. Typically, the  battery will support the grid during peak hours. However, it will also be able to supply power should another blackout occur.

As another benefit, the project demonstrates how renewables can be used for large-scale supply of energy to homes.

It isn’t only in Australia where Tesla is working with utilities on energy storage. The company is also working with Southern California Edison and the Kauai Island Utility Cooperative to install Powerpacks. The batteries that make up these Powerpacks, including those headed to South Australia, are sourced from Tesla’s Gigafactory plant in Nevada.

The latest deal is another key step in positioning Tesla as an energy company rather than simply an automaker. Tesla sees itself as the world’s first vertically integrated energy company, offering its customers a source of energy (solar roofs), a place to store energy (Powerwalls and Powerpacks), and products to use energy (cars).