HOBBS, New Mexico, June 5 (Reuters) - Amid the frenetic activity of American shale oilfields recovering from a two-year recession sit a handful of oil towns that seemed impervious as many producers went into bankruptcy and the economy around them sank.

Occidental Petroleum Corp and a few other oil producers with wells near this town on New Mexico's border with Texas steadily pumped low-cost oil through the downturn, using a technique that has been heralded worldwide as a way to reduce carbon emissions and boost oil output.

"When everyone else in the oil industry was going down, Oxy kept working," said Joshua Grassham, vice president of Lea County State Bank and a Hobbs Chamber of Commerce board member. The city of 35,000 rests on the Permian oilfield, the largest oilfield in the United States.

This way of drilling brings with it a sweetener for the oil industry to keep crude flowing: a tax credit that helps insulate these wells in a downturn, and could triple in size if Congress approves a new measure this summer.

Such a move could extend by decades the producing life of hundreds more wells, increasing oil supply which would be a drag on prices. To date, the technique has been employed only at conventional oilfields, rather than on shale deposits. Some firms are studying how to put the technique to work in shale drilling, too.

The drilling method harnesses the carbon dioxide produced during the extraction of oil or from power plants, and forces it back into the fields. That boosts the pressure underground and drives more oil to the surface.

Their success could be replicated in oilfields across the United States if Congress approves the measure, which already enjoys broad bipartisan support. While the Trump administration has yet to say whether it supports the tax credit increase, the measure could also be a boon to the coal industry, which Trump wants to revitalize.

The technique, one of several so-called enhanced oil recovery (EOR) strategies used to prolong the productive lifespan of oilfields and increase output, underpins around five percent of U.S. oil output, or about 450,000 barrels per day, according to energy consultancy Advanced Resources International.

EOR can help firms to produce between 30 percent and 60 percent of all the oil held in a reservoir. That's far more than the 10 percent usually recovered from initial traditional drilling, according to the Department of Energy.

The existing credit has provided a financial lift for Occidental, Denbury Resources Inc and oil producers with ready access to the gas. Exxon Mobil Corp and Chevron Corp also use the technique on some of their oil fields. None detail their tax savings from the credit, but since the it was first offered in 2008, companies have collected at least $350 million in the credits, according to Internal Revenue Service figures.

In Hobbs, Occidental not only kept a 200-person workforce intact during the oil-price downturn - when tens of thousands of workers were laid off in the shale patch - it also invested $250 million to expand operations during that period, according to its public filings.

That meant Hobbs and nearby Seminole, Texas, where Hess Corp has its own carbon dioxide injection facility, didn't suffer the extreme financial pain felt by shale towns, such as Williston, North Dakota, and other shale producing communities in 2015 and 2016.

"Oxy's investment in the carbon project was a huge economic boost to our area," Grassham said.

Some of the carbon dioxide, a greenhouse gas, comes from naturally occurring reservoirs that are a low-cost source for Occidental. Others get the gas piped from power plants that burn coal. Power companies hope the technique can help them avoid higher carbon emissions.

The company spends about $18 to $25 per barrel to collect oil from its enhanced oil recovery operations. In contrast, its shale-focused well costs are lower - $16 to $19 per barrel. But because EOR wells pump consistently for decades, their value to the company over time exceeds shale wells, whose production quickly tapers off.

Across Texas and New Mexico, Occidental runs one of the world's largest fleet of enhanced oil recovery projects, injecting 2 billion cubic feet of carbon dioxide each day into wells that first produced oil nearly a century ago.

"We had a very large, stable carbon dioxide EOR business in our portfolio during the downturn," said Jody Elliott, president of Occidental's American operations. "That helped."

Partly because of its carbon facilities, Occidental was able to raise its dividend during the downturn. Today, executives are using the profits from the carbon business to grow its shale business across the Permian, the largest acreage holding in the region.

"These two businesses play very well off of each other," Elliott said.

TAX CHANGE?

Congress is expected this summer to debate extending an existing tax credit that could pave way for wider use. The proposed Carbon Capture Utilization and Storage Act would boost the credit to $35 per metric ton of carbon dioxide, up from $10 per ton today.

The legislation failed to move forward during last year's heated presidential campaign, but supporters say it will be reintroduced soon. "We want to make sure that we show a strong commitment so we continue to develop these technologies," said North Dakota Senator Heidi Heitkamp, a Democrat and the bill's lead sponsor.

Electricity generator NRG Energy Inc earlier this year opened a $1.04 billion carbon capture facility at a Texas coal-fired power plant, using its carbon dioxide emissions to extract crude from a 1930s-era oilfield.

Expanding the credit could, supporters hope, encourage more coal-fired power plants to follow NRG's lead by capturing and selling carbon to oil producers. Most oilfields are not located near carbon dioxide supplies, so the tax credit also could spur the build-out of carbon pipelines.

Environmentalists, including the Sierra Club, like the process because it traps carbon underground, preventing it from contributing to greenhouse gas emissions.

"You'll put more carbon in the ground than oil that is produced," said Vello Kuuskraa, president of consultancy Advanced Resources International, which studies enhanced oil recovery and carbon storage.

Oxy is considering investing another $550 million in its Hobbs operation in the next several years to further expand its carbon facilities.

"During all these oil industry downturns, those carbon wells keep people working," said Grassham. (Reporting by Ernest Scheyder; Additional reporting by Mike Wood and by Timothy Gardner in Washington; Editing by Gary McWilliams, Simon Webb and Edward Tobin)