What can store solar power for use after dark, doesn’t require lithium and costs three-quarters of a billion dollars?

The answer is deep beneath the ground in California’s San Joaquin Valley — or at least, it will be.

Last week, a group of local governments announced that they have signed a 25-year, $775-million contract to buy power from what would be the world’s largest compressed-air energy storage project. The innovative technology could help California — and other states and nations — transition from planet-warming fossil fuels to renewable energy, without causing blackouts.

“We need a diverse fleet of resources. This new technology is a critical component of that,” said Robert Shaw, chief operating officer of Central Coast Community Energy, which signed the 25-year contract. “That’s how we get to 100% renewables.”

Phasing out coal, oil and natural gas is crucial to curbing the worst effects of global warming — including California’s whiplash between drought and downpour, a reality playing out across the state this month in deadly fashion.

Solar panels and wind turbines are the lowest-cost solutions. But moving beyond fossil fuels for power, heating and transportation will require dealing with the reality that solar and wind work only when the sun is shining and the wind is blowing.

Lithium-ion batteries can help. They’re an increasingly crucial tool for keeping the lights on during summer evenings. But lithium prices rose sharply last year, driven in part by surging demand for electric cars, and plans for new mines have spurred opposition from conservationists and Indigenous communities worried about harm to wildlife and sacred sites.

And as useful as lithium-ion batteries have become, they typically provide just a few hours’ worth of electricity storage.

“If you want clean, renewable energy every hour of every day of every month of every year, you need long-duration energy storage,” said Julia Souder, executive director of the trade group Long Duration Energy Storage Council.

On afternoons that aren’t as sunny or windy as expected, power companies might not be able to charge lithium-ion batteries to the extent needed. During the winter, there can be long stretches of cloudy, low-wind days.

That’s when technologies such as compressed air might help.

Here’s how the $1-billion project in California’s Kern County will work: The developer, Hydrostor, will drill three shafts thousands of feet underground and send miners to dig out a series of rows and columns. When the project is ready to go in 2028, the caverns will have a collective volume equivalent to two football fields about 100 yards high.

When electricity is cheap — such as on sunny afternoons, when California has more solar power than it needs — Hydrostor will use that low-cost energy to push air down into the caverns. Think of it like storing sunlight in a bottle.

When Hydrostor’s customer, Central Coast Community Energy, needs to draw on the stored power — for example, on a cloudy January day — the company will open a valve and funnel the high-pressure air through a turbine, generating electricity.

It’s not the only long-duration storage technology on the market, but it’s ready to go, according to Hydrostor President Jon Norman.

“We’re going to need all of these solutions,” he said. “But let’s not forget that compressed air is available today.”

The technology has traditionally been limited to places with naturally occurring underground salt domes, where companies can pump down water to dissolve the salt and hollow out caverns. For decades, there were only two operating compressed-air storage projects worldwide: at salt domes in Alabama and Germany.

A challenge is that those projects depend in part on natural gas. The fossil fuel is burned to heat the compressed air as it leaves the salt caverns, because its temperature would otherwise drop significantly as it expands, reducing efficiency.

Hydrostor, which is based in Toronto, is one of several startups working on fixing that. The company says it has figured out a way to capture and reuse the heat generated when air is compressed, eliminating the need to burn gas. It has also figured out a way to make the mechanics work in areas where caverns must be dug out of hard rock, rather than salt.

As with any new technology, it’s hard to know if it will work as advertised. So far, Hydrostor has built a single small commercial project in Canada. The Willow Rock facility in Kern County will be one of its first two large-scale developments.

Outside experts who have examined the company’s approach seem reasonably optimistic.

Goldman Sachs invested $250 million in Hydrostor last year. The Canadian Pension Plan made a $25-million investment a few months later.

Aaron Marks, a senior analyst at energy research firm Wood Mackenzie, says he has “some degree of confidence” in Hydrostor.

“As a first-of-its-kind plant, does that mean its technology is going to work perfectly, with no problems? I doubt it,” Marks said. “But that’s not a strike against the technology.”

Some of the biggest questions surrounding the viability of compressed air involve economics.

Hydrostor expects its Kern County project to produce just 60% to 65% of the electricity it consumes — a larger loss of energy than occurs with lithium-ion batteries and several other kinds of storage. Given the lower efficiency, experts say, compressed air is a relatively pricey alternative to batteries — a problematic reality at a time of soaring electricity rates for California residents.

Additionally, although compressed air hasn’t raised the same environmental concerns as pumped hydropower — the most common form of long-duration storage — some activists have raised questions about the technology’s impact on wildlife habitat.

In comments to the California Energy Commission — which needs to issue a permit before Hydrostor can start construction — the conservation nonprofit Defenders of Wildlife wrote that the Willow Rock project, depending on its design, “could significantly impact several special-status species,” including the burrowing owl, desert tortoise, Swainson’s hawk and Joshua tree.

“We do not believe that sufficient data has been provided by the project applicant,” Defenders of Wildlife wrote.

Asked about those concerns, Hydrostor said in an email that recent habitat surveys will “allow for further review by the dedicated agencies” and that the company “has a rigorous biological survey program planned for spring and summer 2023.”

Even with the potential drawbacks, Central Coast Community Energy — a government-run “community choice” agency that supplies electricity to 450,000 homes and businesses in five counties — saw good reason to invest in compressed air.

Unlike lithium-ion batteries, which degrade over time and must be replaced, compressed air caverns can bank power for decades without loss of efficiency. They can also supply the grid for longer than a four-hour battery. The 200 megawatts under contract to Central Coast — part of Hydrostor’s 500-megawatt project — will provide eight hours of backup power.

Other electricity providers have responded to a state mandate for longer-duration storage by investing in lithium-ion batteries capable of discharging for eight hours. They cost more than four-hour batteries but are still relatively affordable.

Central Coast Community Energy decided to go a different route — in part to avoid volatility in the lithium market, and in part to help prove a technology that the agency’s elected officials believe will ultimately benefit customers.

“It takes somebody to make that initial investment,” Shaw said. “Our board has given that direction.”

This isn’t the first time Central Coast has stepped out ahead of other electricity providers on an innovative storage technology. In 2021, the agency unveiled three contracts for vanadium flow batteries that will also supply eight hours of power.

At the same time, Central Coast isn’t the only electricity provider investing in new kinds of long-duration storage.

Utility company Pacific Gas & Electric announced this month that it’s partnering with Energy Vault on a hybrid system combining lithium-ion batteries and hydrogen fuel cells to help power the city of Calistoga during disruptions of the electric grid.

The Los Angeles Department of Water and Power is also investing in green hydrogen. DWP plans to use excess solar and wind power to split off hydrogen atoms from water molecules, then burn that hydrogen when extra electricity is needed. The hydrogen will be stored in underground salt caverns — which DWP had initially contemplated using for compressed air.

Eric Gimon, a senior fellow at the San Francisco-based research firm Energy Innovation, says he’s skeptical about compressed air storage playing a major role in the power grid. But he’s glad the technology is being given a chance to succeed.

“It’s certainly good to expand the quiver of tools,” he said.

State Sen. John Laird is hopeful. The Santa Cruz Democrat last year wrote legislation — signed into law by Gov. Gavin Newsom — requiring the state to get 90% of its electricity from climate-friendly sources by 2030 and 95% by 2035. Right now, Laird says, the state isn’t on track to meet those goals — or a longer-term target of 100% clean energy by 2045.

Laird thinks the Hydrostor project, which will supply power to some of his constituents, is a useful development.

“We need every tool we can. And this is one,” he said.

This story was originally published in Boiling Point, a weekly email newsletter about climate change and the environment in California and the American West. Go to latimes.com/boilingpoint to sign up.