As a scientist working for NASA in the 1990s, K.R. Sridhar developed a contraption that could use energy from the sun to transform the elements of the Martian atmosphere into breathable air or propulsion fuel.

It passed all its tests, but a planned mission to send it to Mars in 2001 was canceled and Sridhar moved on, looking to apply what he had learned to help stem climate change on Earth instead.

“I came full circle — I was trying to make a really uninhabitable planet habitable,” Sridhar, 56, said recently, holding a black-domed prototype of the shelved device at his Sunnyvale office. “I was thinking, ‘I can do something to make this planet a little more sustainable.’”

Almost two decades later, that thought has led to a fleet of fuel-cell generators that produce electricity through a chemical reaction. And with a recent deal for Sridhar’s company, Bloom Energy, to install generators at a dozen data centers in California and New Jersey for Equinix, a leading operator, it is poised for a major expansion.

The aim of the deal, financed by a subsidiary of a deep-pocketed electric utility, Southern Co., is not only to create a reliable energy source for a power-thirsty industry, but also to help validate a technology that has struggled to gain mainstream acceptance.

What is striking is that the fuel cells are not running on hydrogen, like those long seen as a promising power source for cars. Instead, they use natural gas, which has become plentiful after a production boom over the past decade.

Even though they consume fossil fuels, the gas-powered cells have attracted the attention of some environment-minded policymakers, investors and entrepreneurs because they release less of the heat-trapping gases like carbon dioxide than conventional plants. And they have been slowly finding fans among energy-conscious corporations — in Walmart stores, eBay data centers and Morgan Stanley’s corporate headquarters.

Scott Samuelsen, director of the National Fuel Cell Research Center at the University of California, Irvine, said data centers could become an important market for fuel cells because the industry “appears to want to be more environmentally sensitive but more reliant on their own resources.”

Part of the environmental appeal lies in their efficiency. Fuel cells are generally installed on site, so they do not need to burn extra fuel to compensate for energy lost over long transmission lines. In addition, they use less fuel per watt of power than conventional plants because they don’t burn fuels to heat water or air to spin turbines.

That also makes them quiet, which has proved a surprising barrier to their acceptance among potential customers, Samuelsen said.

“It’s hard for anyone to believe that they’re making any power,” he said. “It’s not like a jet engine.”

The innovations at Bloom stem from Sridhar’s work on NASA’s Mars exploration program when he was director of the Space Technologies Laboratory at the University of Arizona. Trained as a mechanical engineer in his native India, Sridhar arrived at the lab after getting a doctorate at the University of Illinois.

On the Mars project, he focused on using electricity to fuel chemical reactions among elements found on the Red Planet, even creating dirt capable of germinating a seed. Figuring that he should be able to reverse the process, he founded Bloom and worked on converting chemical energy to electricity using readily available fuels and conductors.

Eventually, he and his team hit upon a version of the current design of roughly 5-inch-square fuel cells fused together in stacks — each about the size of a half-loaf of bread and capable of powering an average home. The stacks are loaded into tubular metal casings before being enclosed in banks about the size of a refrigerator that can then be arrayed on the ground or a roof to run large facilities.

The equipment, produced at the company headquarters here with final assembly at a factory in Delaware, is simultaneously high- and low-tech. Each cell is made from a thin ceramic wafer that is mainly zirconia — a relative of the diamond substitute. In a process reminiscent of high school art class, the wafers are screen printed with chemical inks on each side in an automated sequence and then fired in kilns. They are sandwiched between metal plates, and the resulting structure is a solid oxide fuel cell that can operate at very high temperatures, about 1,472 degrees.

At that temperature, when natural gas mixed with steam flows over one surface of the cell while oxygen flows over the other, a reaction results in the release of electricity, steam that is recycled through the process and carbon dioxide.

Equinix tested the Bloom cells at a data center in San Jose for 18 months before committing to the current arrangement, in which it will buy the energy under a 15-year power purchase agreement. The company, which runs more than 185 data centers on five continents, serves as a kind of cloud and network broker. It builds and operates facilities that provide space, power and cooling as well as work rooms, showers and a security system featuring a series of locked chambers like something out of “Get Smart.” The client companies bring their own servers and other hardware to plug into more than 1,000 networks that connect them to customers and to each other.

Atlanta’s Southern Co. comes into the partnership because it has unregulated businesses that sell power nationwide. In this case, Southern buys the fuel-cell generators from Bloom and then, through a subsidiary called PowerSecure, sells the output to Equinix under a 15-year agreement.

The Bloom deal with Equinix and Southern is among the largest ever for a fuel-cell business, but Bloom faces competition from other providers, like Fuel Cell Energy in Danbury, Conn., and has a partnership with Exxon Mobil. It has won a number of recent contracts, which include installing and operating three fuel-cell projects for the Long Island Power Authority and one that will supply power for the Navy submarine base in Groton, Conn.

Indeed, the U.S. government has had a hand in the technology’s development through grant programs at the Energy Department and a federal tax credit that expired at the end of last year.

The natural-gas fuel cells provide some environmental advantages over traditional power plants that run on fossil fuels: They use little water and release almost no smog. The Bloom cells can also run on biogas or hydrogen, which would make them even more environmentally friendly, given a steady supply of those fuels.

The usefulness of natural-gas fuel cells in reducing greenhouse gas emissions is a matter of some debate, however. Some environmentalists and public-utility officials say the fuel cells’ emissions may be understated and question whether their carbon reductions are sufficient to warrant public subsidies.

Still, their emissions are well below the average for coal-fired plants. Bloom puts the emissions of its natural-gas cells in the range of 679 to 833 pounds of carbon dioxide per megawatt-hour, while coal plants released 2,252 pounds of carbon dioxide per megawatt-hour in the second quarter of this year, according to the Power Sector Carbon Index, an analysis published by the Scott Institute for Energy Innovation at Carnegie Mellon University. They are much closer to those of natural-gas plants, which, according to the index, averaged 938 pounds per megawatt-hour during the same period.

Diane Cardwell is a New York Times writer.