With the nation focused on election results, President Trump abruptly demoted the head of a key energy panel who wants to take steps to mitigate climate change — a move the ousted official thinks may have been in retaliation for his views.

On Thursday evening, Neil Chatterjee announced on Twitter he was no longer chairman of the Federal Energy Regulatory Commission, saying Trump had replaced him with fellow Republican James Danly. Chatterjee will still stay on as a commissioner of the five-member panel.

The move comes just weeks after Chatterjee and the agency began clearing the way for regional power administrators to put a price on carbon dioxide emissions, the main contributor to global warming.

The idea of a carbon tax has been discussed for decades and has support across the political spectrum. Many economists say it would be one of the most efficient ways to encourage polluters to cut the amount of greenhouse gases they generate.

But Trump has spent his presidency trying to reduce the regulatory burdens and costs associated with the fossil fuels that produce carbon dioxide when burned.

Chatterjee, a Republican, was appointed by Trump in 2017 to a five-year term on the FERC, an independent commission. Although often a supporter of fossil fuels, he took steps toward allowing electric-grid operators to implement carbon pricing set up by states.

And during his tenure, the FERC opened up electricity markets to rooftop solar panels and storage systems for solar, wind and other green energy.

In an interview, Chatterjee said he thinks his removal from the post could be because his recent actions “aggravated somebody at the White House, and they make the switch.”

“If that’s the case, that’s being demoted for my independence,” he said. “I’m quite proud of that, and will wear it as a badge of honor.”

Chatterjee also speculated that he may have been demoted because he ran workplace diversity trainings, the kind that Trump had banned through an executive order in September.

The White House declined to comment.

Chatterjee, who once served as an energy adviser to Senate Majority Leader Mitch McConnell (R-Ky.), considers carbon pricing a conservative climate solution.

“I made very clear early on in my tenure,” he said, “that I was concerned about climate change and wanted to take concrete steps to mitigate carbon emissions. But I did not believe in heavy-handed regulations, subsidies or mandates.”

In mid-October, he voiced support for a price on carbon, saying it did not “degrade market efficiency” like other anti-pollution regulations. But he added that the FERC would not set a carbon price, leaving that instead to state governments.

Danly, his replacement as chairman, disagreed with the move, calling it “unnecessary and unwise.”

The commission regulates a broad portfolio of activities, including the electricity grid and interstate natural gas pipelines. Many experts regard the agency, which has a low profile compared to the Environmental Protection Agency and other bureaus, as key to cutting greenhouse gas emissions.

The removal of the president’s handpicked chairman is “highly unusual,” said Jon Wellinghoff, who led the commission from 2009 to 2013. “It really makes no sense.”

Richard Glick, the lone Democrat on the FERC, praised Chatterjee in a statement for “his willingness to ignore party affiliation and work with me on several key initiatives.” Danly also praised his predecessor’s “lasting impact” on the agency.

Should Democrat Joe Biden win the White House, he may rely on the agency to help achieve perhaps the most important goal of his climate plan: eliminating carbon emissions from the U.S. power sector by 2035. That would be especially true if Republicans retain their majority in the Senate.

“Without the control of the Senate, which it looks likely he won’t have, Biden is likely to look to FERC and its Democratic chair to achieve many of his climate and energy goals,” said Christine Wyman, a lawyer at Bracewell, a law and lobbying firm that represents energy companies.

Chatterjee’s remaining time as chairman may have been short, anyway.

Some former FERC commissioners hope that if Biden becomes president he will appoint Glick chairman. Glick, whom Trump nominated in 2017, was previously general counsel for the Democrats on the Senate Energy and Natural Resources Committee, where he advised on electricity and renewable energy. Earlier, he worked for three companies on government affairs and advised then-Energy Secretary Bill Richardson and then-Sen. Dale Bumpers (D-Ark.).

Chatterjee said he is ready to work with any Biden appointees to continue “to squeeze carbon out of the power sector,” without setting deadlines. “I’m much more in favor of this type of market approach than setting a goal,” he said.

At times during his tenure, Chatterjee has been an outspoken advocate for coal and gas — once telling anti-pipeline activist and actor James Cromwell on Facebook: “Come at me bro!”

But the solar and wind industries have also criticized Chatterjee for approving a rule last year that they say undermines the ability of renewable energy to compete with dirtier sources of power.

“While we have not always agreed with all of his actions, we’ve appreciated Chairman Chatterjee’s accessibility,” said Gregory Wetstone, head of the American Council on Renewable Energy.

Chatterjee said that during his chairmanship, the agency had taken “steps to make sure our markets are protected if states pursue these policies” for pricing carbon. “The key thing we did is signal to stakeholders that such a plan would not be a dead letter at our door,” he said.

It is possible for Democrats to retake the Senate now that two races in Georgia are moving to Jan. 5 runoffs. If Biden and his running mate, Sen. Kamala D. Harris (Calif.), win the White House, and both Georgia Democrats prevail, Harris would become the tie-breaking vote in the Senate as vice president.

But congressional Republicans also have a chance to lock in a GOP majority at the FERC in the next few weeks. This summer, Trump nominated Democrat Allison Clements and Republican Mark Christie to fill two vacancies on the five-member commission.

If the Senate used the final days of 2020 to approve those picks, Republicans could potentially maintain a full majority on the panel into part of the next president’s term. McConnell’s office declined to comment. FERC is designed to have no more than three members from any political party.