Feelings about Tesla CEO Elon Musk have always run hot, and lately his company has come in for some withering criticism over (among other things) the working conditions at its factories and its inflated stock valuation.

Putting all that aside, though, even his grumpiest critics will have to acknowledge that Musk has just pulled off something genuinely astonishing. To wit: His company built the world’s biggest battery. In record time. On a bet.

How Twitter changed South Australia’s energy future

Our story begins in South Australia, in September 2016, when an apocalyptic storm — involving 80,000 lightning strikes and at least two tornadoes — knocked down dozens of electricity pylons, causing cascading failures throughout the regional electricity grid and casting virtually the entire state of 1.7 million residents into darkness.

Most people had their power restored within 24 hours, though in some cases it took much longer. But there were more blackouts from storms in December, and more from heat waves in February.

Conservative Australian Prime Minister Malcolm Turnbull, somewhat predictably, tried to blame the state’s recent turn toward renewable energy. Partially in response, the head of Tesla’s battery division, Lyndon Rive, claimed the company could build out 100 to 300 MW of batteries in 100 days and solve South Australia’s power problems at a stroke.

Australian billionaire Mike Cannon-Brookes took to Twitter to ask if they were serious.

Lyndon & @elonmusk - how serious are you about this bet? If I can make the $ happen (& politics), can you guarantee the 100MW in 100 days? https://t.co/av38xcizNo — Mike Cannon-Brookes (@mcannonbrookes) March 9, 2017

Musk replied with characteristic Muskitude:

Tesla will get the system installed and working 100 days from contract signature or it is free. That serious enough for you? — Elon Musk (@elonmusk) March 10, 2017

Later that month, the South Australian government unveiled a $550 million energy plan meant to respond to the crisis and stabilize the grid going forward. Part of that plan involved contracting for around 100 MW of energy storage.

Today South Australia is taking charge of our energy future. Find out more: https://t.co/nZMuYIdVLE — Jay Weatherill (@JayWeatherill) March 14, 2017

So Musk got a chance to see his bet through. Tesla won competitive bidding for the entire energy-storage portion of the project in July. The contract was signed on September 29, kicking off the 100 days (though at that point, Tesla was half-finished already). By November 23 (around 40 days shy of the deadline), the battery bank was already finished. Musk’s $50 million — the rough cost of the project — is safe.

Congratulations to the Tesla crew and South Australian authorities who worked so hard to get this manufactured and installed in record time! https://t.co/M2zKXlIVn3 — Elon Musk (@elonmusk) November 23, 2017

Tesla’s big battery

The battery bank — composed of Tesla PowerPacks — was installed in early December and is attached to the 325 MW Hornsdale wind farm, in construction near Jamestown, South Australia. The farm is owned by French renewable energy company Neoen, which contracted with Tesla for storage to create the “Hornsdale Power Reserve.”

The 100 MW/129 MWh battery bank can store enough energy to power about 30,000 homes for about an hour.

It will be the world’s largest lithium-ion battery farm, but not for long. It won’t even be South Australia’s largest for long. The Lyon Group recently began construction on a project northeast of Adelaide that will involve 3.4 million solar panels (with a capacity of 330 MW) alongside 1.1 million batteries, or 100MW/400MWh worth — the world’s biggest solar-and-storage installation.

And it’s already helping out the grid. According to Renew Economy, the battery was able to respond faster than a backup generator when a 560MW coal-fired unit tripped without warning last week. It didn’t avert a blackout, but it showed how handy the battery can be.

Two cautionary notes

Tesla’s achievement here is impressive. While the company’s electric auto business may be endlessly in question, it is consistently outperforming expectations on the battery side. Batteries at this scale, at this cost, at this speed, were not conceivable 10 years ago, even five years ago.

That said, two notes to temper our enthusiasm.

First, the other part of South Australia’s energy plan is to incentivize local natural gas production and build its own 250 MW gas-fired power plant, to cut down on imports of coal power from neighboring Victoria. (South Australia shuttered its last coal-fired power plant in May of 2016.)

Of course, natural gas is an improvement on coal power, and a good complement to renewables, but that power plant is also a big, long-term source of greenhouse gas emissions. Completely decarbonizing the power sector is key to any serious plan to constrain global warming.

In a sense, South Australia is running a real-time competition for which can more quickly and reliably compensate for the loss of coal: renewables and storage, or natural gas. It’s not enough for Tesla to have a successful one-off project — eventually, renewables+storage must outperform natural gas so decisively that investment shifts. That’s the real bar to clear.

Second, it is true that massive storms have destabilizing effects on wind farms — they drive wind turbines up and down so quickly that many of them shut down for safety. The fluctuations and loss of power threaten the larger grid’s reliability. So adding substantial storage to wind farms (and to the transmission grid more broadly) is part of the reliability and resilience story.

But the other part is the distribution (local) grid, not the sources that feed it.

It is the loss of power lines that drives most blackouts — more reliable power plants can’t entirely compensate for that. Greater resilience requires a more resilient grid, which requires a more modular architecture, with microgrids that can island off and keep important loads running, and more sophisticated data, sensing, and automation to help isolate faults before they cascade.

So if Musk really wants to ensure South Australia’s energy security, he should next turn his attention to local grid resilience — to microgrids that can tie together and aggregate the state’s bountiful distributed-energy resources. That is the natural next step for a company focused on long-term sustainability.

Hey Elon: Bet you can’t build a robust, self-sufficient Tesla Microgrid in South Australia in 100 days!