Three years ago, a first-of-its-kind legal case argued that fossil fuel companies were liable for climate change — and should pay up to help cities adapt. That case, filed in July 2017 by two counties and one city in California against 20 fossil fuel companies, alleged that emissions from those companies will be responsible for an estimated 7.4 feet of sea-level rise in coming years.

What happened next is reminiscent of what occurred in the 1990s, when states filed lawsuits against tobacco companies in droves and the public rapidly soured on the industry. More California cities filed climate liability lawsuits against Big Oil, seeking reparations for climate change and its effects. Then other cities and counties from across the country filed their own suits. Oil companies went to court over claims that they lied to investors and the public about climate change, damaged fisheries, and impinged on young people’s right to life, liberty, and the pursuit of happiness.

At every turn, ExxonMobil, Chevron, BP, ConocoPhillips, and Shell fought tooth and nail against the wave of lawsuits, arguing that the plaintiffs should look to the federal government, not the private sector, for financial assistance related to climate change. Now, a new investigation from InsideClimate News has revealed that the federal government has been working with some of those oil companies to oppose the wave of lawsuits.

Some 178 pages of emails between U.S. Department of Justice attorneys and industry lawyers — obtained by the Natural Resources Defense Council — show the government has been planning to come to the aid of these lawsuit-afflicted companies since early 2018. Not only did the DOJ work on an amicus — “friend of the court” — brief in support of major oil companies shortly after the San Francisco and Oakland lawsuits were filed, but the department was also working with Republican attorneys generals from 15 states to come up with a plan to help those companies. Department of Justice attorneys had several phone calls with lawyers defending BP, Chevron, Exxon, and other oil companies, and even met some of them in person.

Curiously, the Department of Justice did not reach out to the plaintiffs in the cases, like the cities of Oakland and San Francisco, to collaborate. The department’s environmental division, which bills itself as “the nation’s environmental lawyer,” opted to covertly work with industry groups rather than the communities it’s supposed to represent.

“The Trump administration’s position is ‘We’re going to side with the fossil fuel interests in the nuisance cases over these cities,’” Phillip Gregory, co-council for the young people’s climate case, Juliana v. United States, told Grist.

“It’s very unusual for the federal government to be so aligned with industry on a damages case,” he said, particularly when the government isn’t implicated in the case. If the lawsuits were successful, oil companies, not the federal government, would be compelled to pay the damages.

Still, it’s unclear whether the DOJ crossed a line. “It wouldn’t pass the sniff test if the DOJ was trying to address substantive issues,” Justin Smith, former deputy assistant attorney general in DOJ’s Civil Rights Division, told InsideClimate News. “If the meetings were about the logistics, there’s nothing improper.”

To Gregory, the DOJ’s actions appear nothing if not political. “The Trump administration wants to control all dealings concerning fossil fuels, even though the fossil fuels are harming the youth of America,” he said. “It’s very capable of looking out for the fossil fuel industry — capable and willing.”