Every industry can be part of the solution — or part of the ongoing problem.

Mention the name Solyndra (or type it into Google), and you’ll find countless jeremiads against government waste. In 2009, the US Department of Energy (DOE) guaranteed loans for the now-defunct solar manufacturer, creating a $528 million loss in 2011.

But like any good investor, the people behind the US government’s energy innovation program made a lot of bets. Some failed. Some paid off. A few were home runs. And by 2016, the DOE loan program that funded Solyndra ended up netting the US government a hefty profit.

In the end, public money for risky technology catalyzed private success: The government collected more than $780 million in interest payments, led to breakouts like Tesla, and leveraged massive new private investments in clean energy such as private utility-scale photovoltaic solar projects. That’s the argument behind the latest paper on effective public investments by Jay Shambaugh, director of The Hamilton Project at the Brookings Institution.

“Why should the government fund what the market won’t?” asked Shambaugh in an email interview. “[When] there are market failures holding back adequate funding in this area.”

Transformative technologies are the least likely to be adequately funded by private investors, at least at first. Shambaugh argues it’s not about the government picking winners and losers. It’s about funding a field of promising ideas before handing off the baton to the private sector.

The US and other countries are still making (slow) progress toward their emissions reduction promises under the Paris Accords. But it’s not enough to achieve the goal of limiting warming to 2°C above pre-industrial levels. Business-as-usual will deliver only a 12% reduction from 2005-level CO 2 emissions by 2040. But strong government financing measures—like the ones that funded Solyndra and its peers—could push the US well past 50% reductions, according to The Hamilton Project.

Technology passes through distinct phases: basic research, applied research, demonstration, and then commercialization. The earlier the stage, the more the government must spend to sustain future private investments, Shambaugh argues. If the private sector takes over to commercialize technology, it often follows decades of massive government effort and investment.

More than a decade can pass before the fruits of R&D investment make their way into the market. Studies (paywall) have found the probability of a scientific article appearing in a patent—often a stepping stone to commercialization—peaks as long as 15 years after the article is published. Similarly, Shambaugh found that $1 million of additional R&D for solar, wind, and biofuel technologies led to a peak in patent citations a full decade or more later.

Shambaugh proposes funding research into high-risk, high-reward opportunities that are unlikely to receive private-sector support, and then back demand-side incentives when technologies are at or nearing commercialization (such as investment tax credits and procurement policies). Carbon capture and energy storage, smart-grid, and connected vehicles are all prime candidates for early funding.

Joseph Majkut, director of climate policy at the center-right think-tank Niskanen Center, says putting a price on carbon—whether by tax or cap-and-trade—is the most market-friendly way to decarbonize the economy. “The largest [market failure] is that emissions are still free,” he said by phone. A carbon price pulls technology into the market. But a push is still needed, he says, for the most dramatic reductions.

That’s where programs like the DOE’s Mission Innovation, which aims to double US clean energy R&D funding from $6.4 billion to $12.8 billion, come in. “Whereas Republican rhetoric on climate used to be that government shouldn’t be picking winners and losers, now they’re talking a lot about energy innovation,” says Majkut. “We’re seeing an appetite on both sides of the aisle to fund innovation.”

The mood on Capitol Hill is shifting—even if success means another failure like Solyndra.