Tesla tackles California energy woes with massive energy-storage deal
A guests takes photographs of the Powerpack system after Elon Musk, CEO of Tesla unveiled suit of batteries for homes, businesses, and utilities at Tesla Design Studio April 30, 2015 in Hawthorne, California.

Tesla just struck a deal to build one of the largest battery storage facilities in the world.

It will provide a 20-megawatt Powerpack system at a substation in Mira Loma, California. The lithium-ion battery system will store 80-megawatt hours of energy, enough to power more than 2,500 households for a day, according to a Tesla blog post. Tesla expects the grid to be completed by 2016. Southern California Edison owns the substation.

The contract is part of a state-mandated plan to improve grid reliability. It was originally ordered in 2013 and got expedited after a massive leak at a natural gas well in Aliso Canyon threatened power supplies.

Tesla shares rose by as much as 3 percent on Thursday.