As fire ripped through the Mendocino County hills the summer of 2018, burning a vast expanse of forest and turning buildings to ash, a curious thing was happening at Eddie Ranch, a sprawling property scorched by the flames.

Its owners were petitioning the state to allow it to be paid millions to preserve trees destroyed by the inferno.

Eddie Ranch said the trees would fight climate change, asserting in its application for California’s carbon “offset” program that they would absorb some 280,890 tons of greenhouse gases. Polluters use the program to outsource their obligations to fight global warming: The credits purchased from faraway forests allow them to claim that the greenhouse gases they release at their facilities are not hurting the planet.

The bulk of the Eddie Ranch carbon credits would be bought by PBF Energy, which was looking to erase — on paper — emissions from its hulking oil refineries in Torrance and Martinez and the gasoline they sell to the motoring public.

Incinerated trees, of course, can’t help the climate. But months after the 2018 fire that burned enough of Eddie Ranch to make nearly all of its planned carbon credits useless in the fight against global warming, the state of California allowed the operation to sell those credits to polluters, basing its decision on the state of the ranch before the fire.

“How do they get away with this stuff?” said Ricardo Pulido, executive director of the nonprofit Community Dreams in Wilmington. The South L.A. clean-air activist is among many exasperated that state climate laws allow oil companies to use the arcane offset system to pollute in communities like his.

PBF said it purchased the credits without checking their origin, and thus was unaware they were linked to Eddie Ranch.

Eddie Ranch was one more puzzling transaction at a time the state’s entire multibillion-dollar market of carbon offsets — most of them generated in distant forests — is under siege.

To comprehend what went down at Eddie Ranch, said Grayson Badgley, a postdoctoral fellow at Columbia University and Black Rock Forest in New York’s Hudson Valley, “imagine a general contractor finalizing the sale of a soon-to-be-completed home while the house under construction is actually in flames.”

California is leading the world in confronting climate change. Its push toward renewable electricity is inspiring other states and countries to step up their goals. The state’s strict rules on tailpipe emissions and its plans to ban sales of new gas-powered cars and SUVs by 2035 are forcing the auto industry to reckon with its outsize role in global warming.

Yet the opaque carbon trading scheme that is a linchpin of the state’s climate efforts — California is leaning on it to meet as much as half of its greenhouse gas reductions — is under serious strain at home even as it is getting copied far beyond California.

The U.S. Senate in late June passed a measure that would substantially expand the market for government-certified offset credits, helping farmers sell them to polluters for practices that many scientists worry won’t help the climate. Such credits could allow the owner of a refinery or plastics factory or power plant in one part of the country to pollute more if they give a farming operation in another part of the country money to tend to their soil in a certain way or use specific types of manure.

The state of Washington is launching a carbon market modeled after California’s, and China is opening its own marketplace. Both allow companies to pollute more if they pay faraway landowners to plant and preserve trees.

Meanwhile, an unregulated cottage industry of firms selling credits to corporations eager to brand as “carbon-neutral” is exploding in the U.S., peddling offset projects that many experts warn quite frequently are not soaking up the greenhouse gases claimed.

The agency charged with enforcing the state’s climate rules, the California Air Resources Board, is determined to stay the course, even as its task force on offsets was rocked by the resignation in February of its environmental advocacy and environmental justice representatives, who wrote blistering letters declaring the offset program broken and tainted by self-dealing.

“Most of the members of the Task Force either represent organizations that have a vested interest in expanding the use of offsets or have ties to industries and organizations that stand to benefit financially from offsets,” said the resignation letter penned by Brian Nowicki, the state climate policy director at the Center for Biological Diversity.

The officials overseeing the state’s climate program aggressively dispute complaints that the offsets are hurting the “fence line” communities in the shadow of the polluting refineries and factories that are using them. Rajinder Sahota, deputy executive officer for climate change and research at the Air Resources Board, said the greenhouse gas emissions from refineries are separate from emissions that contribute to asthma and other health problems.

“The program has worked exactly as we expected,” she said. “There is nothing untoward. There are no questions of its legitimacy.”

The California regulators are also tangling with a credentialed group of scholars at Stanford, UC Berkeley, UC Santa Barbara, Columbia University and the University of Utah who have concluded the state is significantly exaggerating the environmental value of the offsets California polluters are buying.

“We have documented over $400 million worth of credits issued that we think don’t help the climate,” said Danny Cullenward, a lecturer at Stanford and policy director of CarbonPlan, the nonprofit research group created by the scientists. Those dubious credits alone would permit companies to release from their facilities in California the amount of greenhouse gas generated by 6.5 million cars over a year on the road.

CarbonPlan published a database of 65 offset projects to illustrate how lenient — and ineffective — they believe California’s guidelines are. The scientists found the data the state is using to assess properties are flawed and, on average, inflate the greenhouse-gas-absorbing potential of forests in the program by nearly 30%. The state rejects the findings, which have touched off heated debate among forestry experts and preservation groups. The study by CarbonPlan, which Badgley helped lead, is undergoing peer review.

The report is just one of many yellow flags flying around the offset program. There is an even larger question of how many properties in the program were ever in danger of being logged or developed at all. The credits are doing nothing for the climate — and actually damaging it — unless they are creating new “carbon sinks” to soak up harmful greenhouse gases.

“This falls into the category of, ‘If it looks too good to be true, you need to look more carefully,’ ” said Charles Canham, a longtime forest ecologist and manager who regrets helping the Great Mountain Forest in Connecticut get approval to sell millions of dollars’ worth of the credits to California polluters through the program.

The problem with the deal, Canham said, is that the land was already preserved by a local foundation and being managed in a way that would soak up carbon. “We are paying landowners to keep doing what they were already doing,” he said. “People are being unrealistic in claiming this will increase the magnitude of the nation’s carbon sink.”

Back in Mendocino County, the landowners of the Eddie Ranch offset project — who include a gubernatorial appointee to the State Board of Forestry and Fire Protection — received their offsets after the 2018 Ranch fire burned through the project area. PBF can use the credits it purchased from Eddie Ranch to pollute at its Torrance and Martinez refineries.

PBF said it had no idea it was buying credits from Eddie Ranch. “We can confirm we have purchased generic [California Air Resources Board]-certified offsets and credits, and that under CARB’s program buyers such as us are unaware of the origins of the credits when purchased,” the company said in an email.

That’s not exactly how the program works. “Offsets carry with them their project id and reporting period info, so buyers can always know which project generated a credit,” said an email from David Clegern, an Air Resources Board spokesman. Many polluters, like PBF, choose not to ask.

Because the burned trees in the Eddie Ranch project wouldn’t actually absorb carbon, California had to backfill now-worthless offsets — by making a large withdrawal from a state carbon credit insurance fund called the “buffer pool.” Landowners pay some credits into the fund when they sell offset credits to polluters. When landowners can no longer uphold their end of the offset deal — because of fire, bankruptcy or other reasons — the defunct credits get retired and replaced from the insurance fund.

That fund has its own problems. It risks insolvency if wildfires in the West continue at the current pace. Offset projects in some of California’s most fire-prone areas are asked to pay into the buffer pool at the same rates as those for far less combustible forests in places like Michigan, according to a November letter in which 16 scientists urged the Air Resources Board to increase how much landowners must contribute. The state so far has opted not to change the rules.

Everything that happened at Eddie Ranch was permitted under the state’s rules, including the sale of offsets on land that had already burned. New Forests, the investment firm that represented Eddie Ranch in the deal, said the offsets were granted after the trees burned because they were based on measurements of carbon stocks taken earlier, and a lag at the Air Resources Board held things up.

“The Eddie family’s project was developed in careful compliance with all of CARB’s regulations and guidance,” a statement from New Forests said. “While part of the Eddie family’s forest was impacted by fire in 2018, it continues to store hundreds of thousands of tonnes of carbon dioxide and the Eddie family has committed through their forest carbon project to conserve the forest for 100 years.”

The now-worthless credits from the Eddie Ranch property were valued at an estimated $3.9 million at the time the family and its partners offloaded them, according to market data.

Officials at the Air Resources Board regard scientists’ and activists’ warnings about misuse of offsets as old news. The board frequently cites a ruling in its favor by the California Court of Appeal that was unsympathetic to arguments that landowners can too easily take credit for stopping logging or development that was never going to happen.

“The judge said to the plaintiffs, ‘You want the Air Resources Board to go out and put a lie detector on every developer and ask them were you ever going to harvest this land?’” Sahota said. “That is not practical.”

Confronted with a sustained outpouring of anger from residents who have to live with refinery emissions in toxic-air hot spots such as Wilmington, Carson and Martinez, state lawmakers tightened the rules.

Starting this year, the share of total greenhouse gas emissions California polluters can cancel out with offsets dropped from 8% to 4%, and will bounce back up to 6% after 2025. The new rules also force companies relying heavily on offsets to get as many as half of them from projects the state judges to have direct environmental benefits to California.

The numbers obscure the outsize role offsets are playing in the accounting books of the state’s biggest polluters, which can meet most of their obligations to reduce greenhouse gas emissions under the cap-and-trade program using the credits.

The state has certified the sale of enough credits to meet almost all the greenhouse gas reductions required of companies through 2030. The amount is roughly the equivalent of greenhouse gases generated by powering every home in California for two years.

The Air Resources Board has potent and sympathetic allies in its crusade for the status quo. Land trusts, conservation groups and American Indian tribes across the country are heavily invested in a climate action program that has essentially spawned its own economy. Some $2 billion flowed from offset credits over the last eight years, funding educational programs, opioid addiction clinics and cash payments to tribal members, among other things.

Landowners in Alaska alone have reaped roughly $500 million by selling offsets to California polluters, according to an estimate posted by the Alaska Division of Forestry. The Nature Conservancy, one of the nation’s biggest beneficiaries of offset revenue, promised to audit its own transactions amid charges that the organization has generated a windfall for itself by promising to save trees in no danger of getting cut.

The audit concluded in June with the organization reporting that its projects followed all the rules for offsets, but acknowledging those rules may be vulnerable to exploitation. It promised to “reassess elements” of some of its projects and create an oversight team to guide future endeavors. The Nature Conservancy declined to specify what projects it is reassessing or if any of them involved credits sold to California polluters.

Clean-air activists in so-called fence-line communities are out of patience. The refineries continuing to pollute their neighborhoods, they say, have spent years avoiding more aggressive and costly mitigation measures by buying offset credits from afar.

“There have been enough years to see that, whatever the refineries are doing through this program, it is not working,” said Alicia Rivera, a Wilmington organizer at Communities for a Better Environment, as she stood at the property line of the Phillips 66 refinery.

The offsets are an obscure concept to most Californians, but in this neighborhood where residents report shutting themselves inside their homes to avoid the smell of the refinery and cope with rampant asthma and bronchial infections, the topic is familiar.

“It’s not getting better,” Dulce Altamirano, who has lived near the refinery for 22 years, said when asked if the state’s climate rules have improved things in her community. “It is more terrible.”

She wonders if the neighborhood’s dismal air quality — exhaust from the freeways and nearby port create a potent mix when paired with refinery emissions — caused her children’s skin rashes and the breathing troubles that have sent her 11-year-old son, Fredy Herrera, to the hospital multiple times.

“When I would run, my lungs, my lungs … it felt like someone would grab them,” Fredy said inside the family’s home, just a few blocks from the Phillips industrial complex. “It would feel like someone squished them.”

There is heated debate among scholars and scientists about the extent to which the state’s climate laws should be relied on to reduce “co-pollutant” health hazards such as benzyne and nitrogen oxide at refineries. A recent paper from the National Bureau of Economic Research found little evidence that carbon markets are enabling more toxic pollution in fence-line communities.

But the hundreds of millions that oil companies spend on offsets isn’t reducing pollution in local communities, and the extent to which they are helping the climate is in dispute.

Phillips bought an estimated $32 million worth of credits from a forest in the Copper River Basin of Alaska to offset roughly the amount of greenhouse gases that would be created by driving more than 543,000 cars for a year. The credits came from the nation’s biggest offset project, managed by the Ahtna tribe, which is using the revenue for job training and other social programs.

But when the researchers at CarbonPlan examined the project, they were bewildered by how California could confidently declare the forest is preserving so much carbon. Although the state’s rules are supposed to use federal forestry data to describe the type and density of local tree species, no such data exist for that region in Alaska.

At Chevron, which owns large refineries in the Bay Area city of Richmond and the Southern California city of El Segundo, a large volume of greenhouse gas pollution the company is creating in the state is being allowed because it purchased tens of millions of dollars of offsets from the Passamaquoddy tribe in the woods of Maine. In publicly announcing sales of the credits, tribal leaders stressed that the deals allow them to continue doing what they were already doing on the land.

The funds have been a boon for the tribe, which is using the money to invest in its blueberry harvesting and maple syrup production businesses, as well as open a clinic to help tribal members struggling with opioid addiction. But the reality that these offsets would be used by refineries to release emissions in marginalized communities in California weighed on the tribe as it considered whether to go this route.

“We had a two-year debate in the community around this project and whether from a philosophical perspective the tribe ought to be engaging in this program,” said Michael-Corey Hinton, an attorney for the tribe. But Hinton said the tribe saw in the offsets an opportunity to secure a sustainable future and help the environment.

“It was the right move for a socially disadvantaged community suffering our own environmental injustice on a daily basis,” he said. “It is a little bit of an indirect attack to say we are contributors to pollution at a Chevron plant in California. We are not. We have been victims of environmental abuse from all sides, and we are fashioning a way to survive and ensure our existence in this world.”

It is a persuasive argument. Also persuasive is the case the Nature Conservancy makes for selling California polluters millions of dollars’ worth of carbon credits from the St. John River Forest in Maine — enabling the nonprofit to pursue more preservation projects around the world.

But do those California polluters deserve credit for protecting a carbon sink that will absorb 1.2 million tons of greenhouse gases? The Nature Conservancy purchased the 30-mile-long Maine property for $35 million more than two decades ago, as part of a St. John campaign that raised $57 million, suggesting there was substantial cash for the group to preserve the land.

Officials at the conservancy said the California offset revenue allowed it to improve the management practices on the property and reduce timber harvesting, which would not have been possible otherwise, generating significant climate benefits.

“One of the insidious aspects of the program is it hooks conservation and Indigenous groups on a source of funds,” said Neil Tangri, who in February resigned in protest from his post as the environmental justice representative on the state’s offset task force. “So you have a constituency that will fight for this program whether or not it is doing anything meaningful in a larger sense.

“They may be using the money for good things,” Tangri said. “But in the end, it is a Ponzi scheme.”