Tesla has finished work on the world's biggest lithium-ion battery in Australia just eight weeks after Elon Musk signed a deal to "build it in 100 days or its free".

The 100 megawatt capacity battery, located in South Australia, was the state government's response to a statewide blackout in September 2016.

Musk stepped up on Twitter and said he could fix the problem in just over three months. He met with the South Australian Government and insisted the clause be included in the contract.

Work finished on Thursday (23 November). The government will now begin testing the system before operations commence on 1 December. Power for the batteries will be generated by 99 turbines at a wind farm run by French company Neoen. It is all based three hours from Adelaide, South Australia's capital city.

The batteries can store enough power to run 30,000 homes, roughly the same as how many were left without power after the blackouts. It cost A$33m to build (£18.9m). 70% of the battery power will be stored for the state's electricity grid.

Musk applauded all involved for getting the work done in the allotted time:

South Australian Premier Jay Weatherill said the system would make residents more sufficient. "The world's largest lithium ion battery will be an important part of energy mix, and it sends the clearest message that South Australia will be a leader (for) renewable energy with battery storage."

In June, the Australian Broadcasting Corporation reported that South Australia had the highest power prices in the world (overtaking Denmark).

Tesla South Australia Powerpacks
Tesla's biggest battery setup, located in South Australia Tesla

Despite Tesla's efforts in Australia, they still face a nightmare production schedule for the "affordable" Model 3. Deliveries have already been pushed back from December to March 2018 and production is well short of the 5000 a week goal Musk set for the end of 2017.

Musk announced the Tesla Truck and Roadster 2 at an event in California earlier in November. The truck will be powered by four Model 3 engines and the Roadster 2 will reach speeds of 250mph.