It’s the stuff of an action-hero movie: An accident threatens an unsuspecting metropolis. Electricity supplies face disruptions and millions are at risk of being without electricity as blackouts roll across the city. Faced with the prospect of escalating chaos, officials gather on the steps of government buildings and implore, “Who can help us?”

But let’s leave that cliffhanger for a moment, knowing that reality was not quite so—shall we say—Hollywood.

The significance of the Aliso Canyon response almost cannot be overstated, storage advocates say.

Even so, this movie-quality crisis is based in fact and has energy storage as its action hero. The increasingly mainstream zero-emission technology helped ease a real-life crisis that had all the makings of a major catastrophe.

SoCalGas relies on Aliso Canyon to provide gas for core customers—homes and small businesses—as well as non-core customers, including hospitals, local governments, oil refineries, and 17 natural gas-fired power plants with a combined generating capacity of nearly 10,000 megawatts.

As part of a multi-part response to the crisis, the California Public Utilities Commission in May 2016 fast-tracked approval of 104.5 MW of battery-based energy storage systems within the service areas of Southern California Edison (SCE) and San Diego Gas & Electric (SDG&E).

Those utilities, along with the Los Angeles Department of Water and Power—the nation’s largest municipal utility—provide gas and electric service to most of southern California. By the end of February 2017, seven of eight fast-tracked Aliso Canyon–related energy storage projects were online, helping the region’s energy grid regain stability.

The significance of the Aliso Canyon energy storage deployment is “hard to overstate,” says Alex Morris, director of policy and regulatory affairs for the California Energy Storage Alliance, an advocacy group.

For one thing, the stakes were high. After all, rolling blackouts seemed likely across much of the region. For another, the deployment was rapid: roughly six months elapsed between the time the procurement order was issued and when the bulk of the storage resources came online.

Part of what made that rapid deployment possible was California’s growing familiarity with energy storage technology and procurement. That familiarity stems in part from legislation passed in 2013. Known as AB 2514, the state law set an aggressive goal for California’ three regulated utilities, Pacific Gas & Electric, SCE, and SDG&E: Procure energy storage capable of delivering a total of 1,300 MW by 2020 and have it online by 2024.

Much of the learning curve had already been climbed by the time the Aliso Canyon crisis occurred. As a result, energy storage systems could be procured and designed almost simultaneously, with delivery and installation largely a function of the supply chain’s ability to respond.

California’s energy storage goal helped to move ahead of states in the mid-Atlantic and Midwest as the nation’s hotbed for energy storage deployment.

Encouraged by the technology’s declining cost and rapid deployment, California regulators in late April ordered the three big utilities to secure an additional 166 MW of storage capacity each, for a total of around 500 MW. Precisely how that capacity is deployed remains to be seen, but the technology may be called on to support a range of services, including frequency regulation and local substation support.

Indeed, energy storage is a something of a Swiss Army knife, capable of handling multiple duties depending on how and where it is deployed and how it is compensated.

Energy storage can provide instantaneous bursts of electricity for grid support or extended periods of power to meet peak load demand. It even can replace some forms of fossil-fired power generation that traditionally have produced electricity at times of high demand.

Among the Aliso Canyon energy storage facilities now in place is the 20-MW/80-MWh Mira Loma Battery Storage Facility, deployed by Tesla in less than three months. The installation includes two 10 MW systems that contain almost 200 Tesla Powerpacks and 24 inverters. The equipment was manufactured at the recently opened Tesla Gigafactory in Nevada.

Meanwhile, SDG&E and AES Energy Storage deployed two Advancion energy storage units, totaling 37.5 MW. At one of the sites—an SDG&E substation in Escondido, Calif.—a 30 MW, four-hour-duration lithium-ion battery array represents what AES says is one of the world’s largest such storage deployments.

AES Energy Storage deployed one of the world’s largest lithium-ion battery systems

The arrays will provide 37.5 MW of power and serve as a 75 MW resource for grid support. Combined, the arrays can provide enough capacity to power roughly 25,000 homes for four hours. Components include batteries by Samsung SDI and power conversion systems by Parker Hannifin.

The four-hour duration means that the system can provide energy during times of peak demand on the system. Gas-fired turbines often fill that role. But the battery storage system means that energy produced by wind and solar facilities can be stored and then released into the grid in response to demand signals issued by the California Independent System Operator. That helps to advance California’s environmental goals, because battery storage is a zero-emission source.

The 2014 SCE solicitation was for all sources. That means that energy storage competed directly against natural gas on price, among other factors, says Kate McGinnis, Market Director for Western U.S. at AES Energy Storage. The storage system was priced “competitively to a gas peaker,” she says.

The Lazard analysis from late 2016 suggests that lithium-ion batteries used in peaking applications can have a capital cost that ranges from around $420/kWh to almost $950/kWh. On an unsubsidized basis, Lazard pegs the levelized cost of storage using lithium-ion batteries as between $285/MWh and $813/MWh.

California environmental advocates have been increasingly frustrated as renewable energy resources have been curtailed during periods of excess generation. “There is a sense of ‘what a waste,” says Buck Endemann, a San Francisco-based partner in the energy and environmental law practice of K&L Gates. Storage offers an opportunity for excess renewable energy to be captured and used as needed rather than as generated.

As California’s utilities continue to work toward the goals of AB 2514 and the more recent AB 2868, McGinnis says that AES has additional contracts for energy storage projects: a further 40 MW of storage capacity with SDG&E and 100 MW for SCE.

And while no one hopes that a crisis similar to Aliso Canyon happens again, energy storage advocates seem ready to take on a leading role should an action-hero sequel come along.