Energy Secretary Rick Perry has told President Trump he is resigning amid scrutiny related to his role in the Trump administration’s diplomacy in Ukraine, the Washington Examiner has confirmed from sources with knowledge of the situation.

His resignation ends his tenure as the last original Cabinet head from the core energy and environment agencies, after the EPA’s Scott Pruitt and Interior’s Ryan Zinke quit while facing investigations over their ethics.

Trump said Thursday evening that he had known for months that Perry intended to leave, and said that he would exit the role at the end of the year. “We already have his replacement. Rick has done a fantastic job. But it was time,“ he said during a trip to Texas.

Perry, the former Texas governor and presidential candidate, had been more politically savvy than his counterparts, reveling in his job as chief pitchman for American "energy dominance." It was a stark turn for Perry, who as a presidential candidate pledged to abolish the Energy Department.

But he became a central character in House Democrats’ impeachment inquiry of Trump.

Democrats issued a subpoena to Perry on Oct. 10 seeking documents related to Perry's knowledge of Trump’s July 25 phone call with Ukrainian President Volodymyr Zelensky, in which Trump pushed his counterpart to investigate Democratic rival Joe Biden.

Perry confirmed he asked Trump to hold a phone call with Zelensky but said he sought the conversations as part of efforts to curb corruption in Ukraine’s energy sector and encourage energy investment opportunities.

He has denied discussing the Biden family with Ukrainian officials.

It remains unclear how much the Ukraine investigation played into Perry’s decision to resign. He has long been rumored to quit for work in the private sector.

As recently as Oct. 8, Perry, during one of his trademark diplomacy tours in Eastern Europe, denied he planned to resign.

On a policy level, Perry leaving the Energy Department won’t change the agenda set by the agency during his tenure, which focused mostly on exporting coal and natural gas.

Just like Pruitt and Zinke were replaced by more seasoned operators, Perry will be succeeded, at least on a temporary basis and likely more permanently, by a career conservative bureaucrat, Deputy Energy Secretary Dan Brouillette.

Perry was best known for his failed bid to save struggling coal and nuclear plants by proposing a plan to subsidize them, which was rejected by the Federal Energy Regulatory Commission. He also pushed Eastern European countries dependent on energy from Russia to increase imports of American liquefied natural gas, touting gas’ role in reducing emissions in the U.S. as an alternative to coal.

Perry, who oversaw the wind energy boom in Texas, expanded his agenda beyond promoting fossil fuels. He defended the Department of Energy’s advanced energy research agency from White House budget cuts, boosted research into battery storage, solar power, and artificial intelligence, and established a new cybersecurity office.