It's the latest response to a fossil-fuel disaster.

EghtesadOnline: Tesla just won a bid to supply grid-scale power in Southern California to help prevent electricity shortages following the biggest natural gas leak in U.S. history. The Powerpacks, worth tens of millions of dollars, will be operational in record time—by the end of this year.

Tesla Motors Inc. will supply 20 megawatts (80 megawatt-hours) of energy storage to Southern California Edison as part of a wider effort to prevent blackouts by replacing fossil-fuel electricity generation with lithium-ion batteries. Tesla's contribution is enough to power about 2,500 homes for a full day, the company said in a blog post on Thursday. But the real significance of the deal is the speed with which lithium-ion battery packs are being deployed.

"The storage is being procured in a record time frame," months instead of years, said Yayoi Sekine, a battery analyst at Bloomberg New Energy Finance. "It highlights the maturity of advanced technologies like energy storage to be contracted as a reliable resource in an emergency situation."

Here's a chart showing the acceleration of energy-storage deployment as batteries gain popularity.

Bloomberg New Energy Finance

The deal fits into Tesla Chief Executive Officer Elon Musk's long-term vision of transforming Tesla from an an electric car company to a clean-energy company. That's the same motivation behind his pending deal to acquire SolarCity Corp., the rooftop solar company founded by his cousins, of which he is also chairman and the largest shareholder.

In total megawatt hours, the Tesla batteries will make up the biggest lithium-ion battery project in the world, though it will soon be surpassed by others under contract, according to data compiled by Bloomberg New Energy Finance.1 A Tesla spokeswoman declined to comment on the value of the 20 megawatt deal. According to Tesla's website, a 2-megawatt Tesla battery system costs about $2.9 million, and any contracts greater than 2.5 megawatts must be negotiated directly with the company.

Last fall's natural gas leak at Aliso Canyon, near the Los Angeles neighborhood of Porter Ranch, released thousands of tons of methane before it was sealed in February. In its wake, SCE and other utilities are pursuing energy storage deals. To alleviate the risk of blackouts, regulators ordered the installation of systems to store electricity when demand is low and deploy it when usage spikes, especially during the winter heating season.

Although Sempra Energy plugged its massive gas leak in February, use of its Aliso Canyon complex, California’s biggest gas storage field, remains restricted. Grid-storage projects are now being fast-tracked and built in less than four months, compared to an average of three and a half years in previous procurements, according to data compiled by Bloomberg New Energy Finance.

In August, California regulators approved two contracts for AES Corp. to build 37 megawatts of grid-scale energy storage systems to address anticipated power shortfalls stemming from the Aliso Canyon leak. Canadian energy company AltaGas Ltd. also won a 20 megawatt (80 megawatt-hour) contract with Southern California Edison to be completed this year.