HOUSTON (Reuters) - A federal judge in Texas on Wednesday kicked an Exxon Mobil Corp lawsuit seeking to thwart two states from pursuing a fraud case over climate change to a Manhattan court, saying his court wasn’t the best place to resolve the dispute.

The logo of Exxon Mobil Corporation is shown on a monitor above the floor of the New York Stock Exchange in New York, December 30, 2015. REUTERS/Lucas Jackson/File Photo

A group of state attorneys general, led by New York’s Eric Schneiderman, brought a securities fraud suit against the world’s largest publicly traded oil company in 2015 claiming it misled investors by soft-pedaling the dangers of climate change.

Exxon criticized their case as intended to get the company and others in the oil and gas industry to change their positions on climate change. It responded with its own suit in U.S. District Court in Dallas.

That suit argued the states conspired with climate activists to target Exxon and the states’ demands for documents dating back 40 years violated its rights to protection against unreasonable searches and were abusive.

U.S. District Judge Ed Kinkeade, who earlier sought to question Massachusetts Attorney General Maura Healey over Exxon’s claims the original fraud lawsuit was biased, ruled in favor of Healey and her New York counterpart. He wrote his court was not the proper venue because events at issue in the case took place in New York.

But the judge’s decision questioned whether the two AGs “are trying to hide something,” citing an agreement with climate activists not to publicly discuss their contacts. He also said the agreement should be open to discovery by Exxon attorneys.

Exxon had argued that the requests for documents were, as the judge summarized it, tools to cultivate the political goals of Healey and New York Attorney General Eric Schneiderman.

Despite having the case transferred to Manhattan, an Exxon spokesman said the company was gratified the judge agreed its “claims involve important issues,” adding: “We look forward to continuing the case in that court.”

Healey also lauded the decision to move the case, saying “we will continue to argue that this frivolous lawsuit should be dismissed.”

Amy Spitalnick, a spokeswoman for Schneiderman, said in a statement that the judge’s remarks in the ruling were “riddled with factual errors and oil industry spin,” and said Exxon was free to make the same claims in New York but “so far, inexplicably have not done so.”

The case is 4:16-cv-00469 in U.S. District Court for the Northern District of Texas, Fort Worth division.