Tesla has completed construction of a massive 100-megawatt, 129-MWh battery installation in South Australia. The new facility boasts the largest megawatt rating for any grid-connected battery installation in the world.

The project was completed less than two months after the contract was signed on September 29, putting it ahead of schedule. Musk had promised Australian authorities that he would complete the project in 100 days or the project would be free. Musk has said it would cost Tesla "$50 million or more" if the company failed to meet the deadline.

"Congratulations to the Tesla crew and South Australian authorities who worked so hard to get this manufactured and installed in record time!" Musk tweeted late on Wednesday night (Thursday in Australia).

The state of South Australia saw a need to beef up its electricity infrastructure after a September 2016 storm caused a state-wide blackout. State officials wanted to ensure that didn't happen again, and they wanted to find a solution that made use of renewable energy.

The Hornsdale Wind Farm near Jamestown, South Australia, produces 315 megawatts of electricity, but, like any wind farm, it's not a steady source of power. So Tesla's batteries will charge up during periods when the wind farm is producing excess energy, then supply extra power to the grid during periods of peak demand.

Tesla's involvement in the project originated from a March Twitter conversation between Musk and Australian billionaire and software entrepreneur Mike Cannon-Brookes. Musk said that if he got the contract, "Tesla will get the system installed and working 100 days from contract signature or it is free."

Tesla won a competitive bidding process in July and signed the contract in September. The system needs to undergo a few days of testing and is expected to be put into operation in early December.

Tesla is normally thought of as a car company, but this announcement underscores that Tesla is really a battery company that happens to put some of the batteries in cars. It has built a massive battery factory in Nevada and needs to make sure it can sell the correspondingly massive number of batteries that factory will be producing in the coming years.

Of course, most of those batteries are supposed to go into Tesla's cars. But developing a side business in battery packs for use by residential customers and electric utilities helps to diversify Tesla's business. If the car business hits unexpected snags—as it has with the Model 3 launch in recent months—Tesla can sell the extra batteries for non-car uses.

And it's going to take a lot more installations like the one in South Australia if the world is going to ultimately wean itself off fossil fuels. Wind and solar energy are becoming increasingly affordable, but both types of power produce energy intermittently. Huge battery installations ensure that utilities can supply households with electricity even when the supply of renewable electrons fluctuates.