California has long sought to be at the forefront of a cleaner environment and cleaner energy standards. Although Bakersfield was the site of some of America’s earliest oil production at the beginning of the 20th century, more recently, California has worked to dramatically reduce smog and CO2 levels through strict emissions requirements and, more recently, a carbon “cap and trade” program. The state’s clean energy goals for the future were similarly ambitious. By 2030, California aims to get half of its energy from renewable sources. Getting there will most likely require significant innovations in renewable energy technology, especially batteries and other types of energy storage, especially now that the state is fully committed to closing Diablo Canyon, its last nuclear plant in operation.

In an announcement on Thursday, California’s Public Utilities Commission (CPUC) voted to allow the state’s primary utility company, the Pacific Gas and Electric Company (PG&E), to close the Diablo Canyon plant in 2025. One of the CPUC commissioners described the vote as a move “away from the era of nuclear power and toward the era of zero-carbon renewable energy.”

Diablo Canyon’s closure had expected for more than a year. In June, 2016, PG&E announced that it would close the plant when its operating permits expired in 2025. The closure was part of a joint agreement between environmental groups, labor groups, and the utility.

Closing the plant will have a significant effect on the California utility market. The Diablo Canyon plant produces about 8 percent of the state’s electricity. The closure of the plant comes as state regulators are increasingly pressuring utility companies to move away from natural gas generation in favor of a combination of solar and wind power and battery storage.

The Diablo Canyon closure will come at an already difficult time in California’s utility market. An additional order approved on Thursday requires PG&E to change how it supplies power during periods of peak demand. Presently, PG&E purchases power from three natural gas generators when it needs to boost capacity. The CPUC ordered the utility company to solicit bids for energy storage and approved green generation methods, specifying that these resources must be online early enough to ensure that contracts with the gas generators will not be renewed for 2019.

In part, this is an attempt to make use of the recent surge in the supply of solar power in California. The state’s overall generation last fall, the most recent period for which data is available, increased by 9.5 percent over 2016 and much of this increase was the result of more solar panels. California has more installed solar generation capacity than any other state.

Whether this will be enough to push the state to its ambitious carbon reduction goals is another question. As renewable energy skeptics frequently point out, renewable energy sources like solar and wind are inconsistent means of generation. Even though California’s often sunny weather gives solar a boost, the panels do not produce any electricity at night.

In an attempt to mitigate this, California utilities have been building large amounts of energy storage. Last year, state utilities built 332 MW of batteries, up from only 200 megawatts in 2015. This storage capacity comes as renewables jumped from 11 percent of the state’s electricity supply to 25 percent in a decade. Solar power provides about 15 percent of the state’s electricity.

At the same time, the three natural gas generators slated to be closed provide necessary extra capacity for the state. The Metcalf Energy Center, for example, has sufficient capacity to power roughly 454,000 homes, more than exist in San Jose. Under the current plan, this plant would be closed.

Right now, two energy storage facilities are under construction in the state and a third, built with batteries designed and produced by Tesla, is already in operation. All told, the three storage facilities will add 77.5 MW of storage capacity to the grid. These facilities are being used by other California utility companies. PG&E, meanwhile, presented six energy storage contracts totaling 165 megawatts (MW) to the CPUC for its approval in early December. Despite the build up, battery storage capacities are dwarfed by production capacity of the natural gas generating stations they are intended to replace. The Metcalf Energy Center can produce more than 600 MW, meaning that many more of these storage facilities will be required to pick up the slack as the natural gas plants close.

The closing of the Diablo Canyon nuclear power plant only highlights the engineering challenges of California’s legally mandated transition to green energy and shows how much of this transition rests on the strength of battery technology.

Follow Erin on Twitter.