Energy Secretary Rick Perry notified President Trump on Thursday that he intends to leave his job soon, two administration sources familiar with the matter said.

Perry was traveling with the president to Texas when he shared the news aboard Air Force One. Speaking to reporters later Thursday, Trump called Perry "outstanding" and announced, "We already have his replacement." But, Trump said Perry would stay on until the end of the year.

"It's his time. Two years is a long time," Trump said. "We have the man ... we're going to be putting in Rick's place."

Fox News is told Perry had planned to resign at the end of the year. However, the former Texas governor had come under scrutiny over the role he played in the president's dealings with Ukraine, which are currently the subject of an impeachment inquiry -- raising questions as to whether the probe factored into his announcement Thursday. House Democrats subpoenaed Perry earlier in the day as part of their investigation.

Perry was scheduled to attend an energy conference overseas with U.S. Ambassador to the European Union Gordon Sondland, who testified Thursday in Democrats' inquiry. A Capitol Hill source and an official at the Energy Department told Fox News that Perry is still slated to head to Brussels and the Middle East next week as planned.

Multiple administration sources reiterated to Fox News that Perry was central to the apparent foreign policy operation to encourage a Ukrainian investigation into Joe Biden's actions involving the country. They said Perry was one of a handful of officials working this matter hand-in-glove with Trump and the president's personal attorney Rudy Giuliani.

Perry had disputed reports that he was planning to leave the administration in an interview Wednesday with The Wall Street Journal. But, he reportedly left the door open, saying he expected to be at the Energy Department at Thanksgiving, but giving a less definitive answer when asked whether he'd be there through the end of the year.

In their subpoena, the chairmen of the House Intelligence, Foreign Affairs and Oversight committees asked Perry to provide documents related to a Ukrainian state-owned energy company as well as his involvement in a July call between Trump and Ukrainian President Volodymyr Zelenskiy. The lawmakers set a deadline for Oct. 18.

Trump has said Perry teed up the July 25 call, in which Trump pressed Ukraine to investigate Joe Biden and his son Hunter, who was employed by a Ukrainian gas company. Hunter obtained the highly lucrative role despite no relevant expertise while his father, as vice president, was overseeing Ukraine policy.

Perry said in the Journal interview that the president told him to seek out Giuliani earlier this year to look into possible Ukrainian corruption.

"Visit with Rudy," Perry recalled Trump telling him. He told the paper that Trump was not convinced that Kiev had "straightened up" its act. Perry told the paper he never heard Trump or Giuliani talk about an investigation into the Bidens.

Shaylyn Hynes, a spokeswoman for Perry, has said he wanted Trump to speak with the Ukrainian leader on energy matters related to U.S. efforts to boost Western energy ties to Eastern Europe, part of a long-term effort to lessen the political control Russia has wielded through its dominance of the fuel supply. Read more at FOX News