Billionaire investor Carl Icahn, who resigned as President Donald Trump’s special adviser on regulations on Friday, did so just hours before The New Yorker magazine published a critical article that detailed his potential conflict of interest and questioned whether he had acted illegally.

Icahn, an early endorser of Trump’s presidential bid and longtime acquaintance, said in a letter he was resigning from the adviser’s post because he “did not want partisan bickering” to distract from the president’s agenda. He also denied any conflict of interest, stating that he “never had access to nonpublic information or profited from my position.”

The New Yorker, however, reported on Friday that Icahn had been pushing to overturn an environmental regulation the investor considered onerous and one that had been costing him hundreds of millions of dollars a year.

Under the rule in question, passed by Congress during President George W. Bush’s administration in order to promote biofuels and renewable energy, oil refineries are required to blend ethanol into their products, or, alternatively, to purchase credits known as Renewable Identification Numbers. Icahn in 2012 bought a controlling stake in one such refinery, Texas-based CVR Energy, whose business had depended on buying so-called RINs. Their cost had fluctuated so much by 2016, however, that it had seriously depressed the company’s stock price.

Several weeks after Trump’s victory last November, Icahn was named as an adviser to the president and CVR’s stock doubled on the expectation that the regulation would be repealed, according to The New Yorker.

In February, news leaked that Bob Dinneen, who runs the Renewable Fuels Association, a leading ethanol trade group, had struck a deal with Icahn to change the ethanol blending requirement. The development surprised observers and industry experts because the association had long opposed such a change, the magazine said.

Dinneen told The New Yorker that Icahn had told him that Trump would change the rule through executive order whether or not the ethanol lobbyist objected. Dinneen agreed to the change because he “apparently felt that his only option was to secure whatever concessions he could for his industry,” according to the magazine article.

Trump administration officials denied that any such ethanol executive order was in the works. But one official, speaking anonymously to The New Yorker, said the draft of such an order “was something Icahn sent to us.”

The suggested order was never acted upon, according to the administration officials, in part because changing the congressionally approved regulation is a complex process. But the episode raises questions as to whether Icahn had used his position inappropriately; whether, as The New Yorker puts it, Icahn thought “that he could bluff his way to a change in federal regulation.”

In his statement on Friday, Icahn stressed that he did not use his title and association with the president for personal gain.

“Indeed, out of an abundance of caution, the only issues I ever discussed with you were broad matters of policy affecting the refining industry,” he wrote to Trump. “I never sought any special benefit for any company with which I have been involved, and have only expressed views that I believed would benefit the refining industry as a whole.”

Richard Painter, who served as the Bush administration’s ethics lawyer from 2005-2007, suggested to the magazine that the Justice Department’s public-integrity division investigate Icahn’s actions as a Trump adviser.

“If he was advising on a matter where he had an interest, then Icahn was in direct violation of the criminal statute,” Painter said.

Read the whole story at The New Yorker.