Irving, Texas, oil giant Exxon Mobil must hand over internal documents about global warming to the Massachusetts attorney general, a federal judge ruled earlier this month. It was just the latest development in a strange legal battle that’s sucked in the Texas attorney general and cast a shadow over President-elect Donald Trump’s pick to head the State Department.

It started last March when New York was joined by Massachusetts and the U.S. Virgin Islands in demanding the documents.

“Fossil fuel companies that deceived investors and consumers about the dangers of climate change should be, must be, held accountable, " Massachusetts Attorney General Maura Healy said at a press conference at the time.

The states gave two reasons for investigating Exxon Mobil: to find out if the company misled investors by hiding what it knew about global warming and to find out if it defrauded consumers.

“The fraud cases are really about people being harmed by climate change and Exxon

Mobil’s product being part of that process at the same time that they're essentially arguing that the science is not valid,” said David Spence, professor of environmental regulation at UT Austin.

The lawsuits remind some people of the legal actions states filed years ago against tobacco companies.

“I think the parallels are clearly there,” said Tom McGarity, who also teaches law and environment at UT Austin and wrote a book about the tobacco industry. “I think that the tobacco cases inspired this case.”

KUT's Mose Buchele reports

McGarity said he thinks the company became so afraid of the prospect of multistate lawsuits like what happened with tobacco that it countersued the states.

“There’s something of a Donald Trump approach to things in this: 'You hit me, I’ll hit you back twice as hard,'" he said. "And just telling the world, 'Look, you don’t come after Exxon Mobil for something it did in the past.'”

Coming to Exxon’s aid in those countersuits: Texas Attorney General Ken Paxton.

“To me, I think this is best explained through political optic,” Spence said. “The attorneys general are from Democratic states, and there’s plenty of political upside to pursuing the case. Certainly the Texas attorney general, who has been intervening on the side of Exxon Mobil, probably gets political benefits from doing that.”

The countersuit strategy seemed to work against the Virgin Islands, which dropped its investigation. In North Texas, a federal judge even demanded that Healy come to Texas to be deposed by ExxonMobil – a move Spence says many legal experts found baffling.

“Trying to haul a state official who’s doing their job into court in another state to sort of, you know, punish them for that seems very unlikely to be successful,” Spence said.

And indeed the judge dropped that demand. Most recently, Massachusetts scored a victory when a judge ruled that Exxon had to turn over its documents, increasing the possibility that they may, one day, become public.

“I would like to see what documents come out of this,” McGarity said. “The tobacco documents -- when they became available -- they were incredibly revealing.”

But both he and Spence agree that the states suing Exxon will have a hard time winning their cases.

The lawsuits and countersuits have already had at least one consequence: They’ve complicated the prospects of Trump’s pick for secretary of state, Rex Tillerson.

Tillerson worked for decades at ExxonMobil, including as CEO. Last week at Tillerson's confirmation hearing, Virginia Sen. Tim Kaine asked what the company knew about climate change, but Tillerson refused to answer.

Despite that refusal, it’s worth noting that Exxon Mobil now acknowledges that the world is warming and that fossil fuel emissions play a role.