Since the high-profile bankruptcy of Solyndra, the solar company that received $535 million in federal loan guarantees, many have concluded that government efforts to promote energy technologies are doomed to fail. Critics cite the abandoned synthetic fuels program, attempts to capture carbon pollution from coal plants and next-generation nuclear reactors as further proof of this conclusion.

Many often point to the shale gas revolution as evidence that the private sector, in response to market forces, is better than government bureaucrats at picking technological winners. It’s a compelling story, one that pits inventive entrepreneurs against slow-moving technocrats and self-dealing politicians.

The problem is, it isn’t true.

The breakthroughs that revolutionized the natural gas industry — massive hydraulic fracturing, new mapping tools and horizontal drilling — were made possible by the government agencies that critics insist are incapable of investing wisely in new technology.

This will surprise those steeped in the hagiography of George Mitchell, the tenacious Texas oil man who proved that gas could be drawn from shale rock at a profit. The popular telling has Mitchell spending 20 lonely years pursuing the breakthroughs to tap the Barnett Shale, an underground expanse.

While Mitchell did face skepticism from industry, and from many of his employees, he overcame the myriad obstacles to cheap shale gas extraction with help from technologies developed with taxpayer money.

Slick-water fracking, the technology that Mitchell used to crack the shale gas code, was adapted from massive hydraulic fracturing, a technology first demonstrated by the Energy Department in 1977. Over the next two decades, Mitchell and others, with government support, tinkered with the technology, exploring ways to use fewer chemicals and more water, which substantially reduced the cost of extraction.

Mitchell learned of shale’s potential from the Eastern Gas Shales Project, a partnership begun in 1976 between the Energy Department’s Morgantown Energy Research Center and dozens of companies and universities that sought to demonstrate natural gas recovery in shale formations and to map and test core samples from unconventional natural gas deposits. Starting in 1981, Mitchell’s geologists drew heavily on that research to guide their explorations.

Mitchell’s success depended on a revolution in monitoring and mapping technologies driven largely by government labs. The new technologies allowed geologists to more precisely map and understand shale formations. In 1991, Mitchell asked the publicly funded Gas Research Institute, then funded by a tax on gas production, and the Energy Department for help. Sandia National Labs provided Mitchell with many critical microseismic tools. Mitchell also benefited from 3-D imaging, which the Energy Department had long supported.

The third critical technology was horizontal drilling and well installation, a breakthrough that captured much more shale gas than conventional vertical wells had. The government had supported innovative drilling methods since the ’70s; in 1976, two government engineers, Joseph Pasini III and William K. Overby Jr., patented an early-stage directional drilling technology that became the precursor to horizontal drilling. A decade later, a joint venture between the Energy Department and industry drilled the first horizontal Devonian shale well, which allowed gas to be extracted from multiple fractures and wells.

The Energy Department also pioneered better drill bits and air-based drilling, which better protected the gas assets of geological formations. And in 1991, the publicly funded Gas Research Institute recommended that Mitchell experiment with horizontal drilling and even subsidized his first horizontal well.

Ultimately, Mitchell and other gas developers’ decision to spend millions of dollars and nearly two decades pioneering techniques that few thought would result in commercially viable extraction is less quixotic than it might have appeared. The federal government generously subsidized drilling for non-conventional gas throughout the 1980s and 1990s, when oil and gas were cheap. While the rise in natural gas prices in the late 1990s sparked the shale gas revolution, it was the federal non-conventional gas tax credit that made Mitchell’s experimenting possible in the early years, when there was no market for more expensive shale gas.

Giving the federal government credit where it is due takes nothing away from Mitchell, who was determined and tenacious. But the lesson of the shale gas revolution is that we should not be so quick to judge government investments in energy technology. Between 1978 and 2007, the Energy Department spent $24 billion on fossil energy research. Billions more were spent through the Gas Research Institute and non-conventional gas tax credits. Those investments were widely panned as a failure during the ’80s and early ’90s, when gas was plentiful and cheap.

Whatever one thinks about shale gas today — we worry about its environmental consequences — there’s no denying the extraordinary economic return on taxpayer investments. Shale gas is likely to allow the United States to go from net gas importer to a net gas exporter over the next decade.

While details vary, the story is basically the same for nuclear power, natural gas turbines, solar panels, and wind turbines — pretty much every significant energy technology since World War II. That’s because the private sector alone cannot sustain the kind of long-term investments necessary for big technological breakthroughs in the midst of volatile energy markets and short-term pressure to produce profits.

No doubt, government energy innovation investments could be made more efficiently and effectively. But it would be a mistake to imagine that we’d be better off without them.

Michael Shellenberger is president and Ted Nordhaus is chairman of the Breakthrough Institute, an Oakland-based, nonpartisan public policy think tank focused on progressive politics.