President Trump dismissed the Defense Department’s top policy official, who had clashed with colleagues at the White House and the Pentagon over the implementation of Trump’s foreign policy agenda since assuming office more than two years ago.

Undersecretary of Defense for Policy John C. Rood, a former top executive at the defense contractor Lockheed Martin, said in a letter to the president that his last day would be Feb. 28. Rood wrote that he understood, from speaking to Defense Secretary Mark T. Esper, that Trump had requested his resignation.

“I am grateful for the opportunity to serve with the many talented and devoted professionals in the military and civilian ranks of the Defense Department,” Rood wrote. “While much work remains to be done, I am proud of the many accomplishments we have made instituting and implementing the National Defense Strategy, which reshapes U.S. security priorities.”

Rood was the top Pentagon official who certified that Ukraine had sufficiently met its anti-corruption targets in order to receive military aid as required by U.S. law. Trump’s effort to hold that aid, while his personal attorney demanded Ukraine’s leader announce investigations into former vice president Joe Biden and the Democrats, led to Trump’s impeachment by the House of Representatives late last year.

In an email to Esper hours after Trump’s July 25 call with Ukrainian President Volodymyr Zelensky, Rood said that “placing a hold on security assistance at this time would jeopardize this unique window of opportunity and undermine our defense priorities with a key partner in the strategic competition with Russia,” CNN reported. The hold proceeded anyway.

Asked whether Rood’s dismissal was related to his certification of the Ukraine aid, chief Pentagon spokesman Jonathan Rath Hoffman said, “I have no information that would lead me to believe that.”

“The president can make a decision to go in a different direction, so I’m not going to speculate on the motivations,” Hoffman said, noting that James Anderson, who is serving as Rood’s deputy on a temporary basis, would take over the post until a permanent replacement is appointed.

Trump tweeted about the decision Wednesday but didn’t give a reason for Rood’s dismissal. “I would like to thank John Rood for his service to our Country, and wish him well in his future endeavors!” the president wrote.

Esper said in a statement that “John has played a critical role on a wide range of DoD issues including modernizing our nuclear deterrence capability, efforts to increase burden sharing by our NATO allies, our Missile Defense Review and implementing the National Defense Strategy. I wish him all the best in his future endeavors.”

Despite Rood’s role in the Ukraine drama, officials at the White House had been agitating for his removal for months for other reasons. One former administration official said Trump recently asked his aides for the names of people he should get rid of because they weren’t loyal, and Rood was mentioned.

Rood served in positions at the CIA, the State Department and the Senate for more than 20 years, and had differed with fellow political appointees, particularly officials on the White House National Security Council under former national security adviser John Bolton.

Several former officials, who spoke on the condition of anonymity to discuss a former colleague, said Rood’s advocacy for positions supported by uniformed officials, which often contradicted White House agendas, had repeatedly created friction with administration leaders.

The officials said Rood was the subject of White House criticism for his role in the Pentagon’s reluctance to provide the White House with plans for a possible withdrawal of U.S. forces from Syria before Trump abruptly announced a pullout in December 2018. Military officials had opposed the move because they did not think the mission against the Islamic States was finished. Trump later backed away from his decision but eventually reduced the force there.

One former official said Rood had also angered some at the White House by opposing the designation last April of Iran’s Islamic Revolutionary Guard Corps (IRGC) as a foreign terrorist organization, another position widely shared within the military. He had also clashed with White House officials over Venezuela policy, the former official said.

One of the former officials said Rood occasionally took the unusual step of calling the National Security Council to request changes to readouts from White House meetings, including over what the former official said was an inaccurate representation of a Pentagon position in favor of the IRGC designation. Rood’s intervention was first reported by Yahoo News.

Rood also differed with White House officials over Trump’s desire to ratchet up pressure on Japan and South Korea to pay more for U.S. troops stationed there, according to former officials.

Trump’s proposed Syria withdrawal was met with criticism from many military officials, as was a later reallocation of American forces in Syria. The December 2018 announcement, among other issues, led to the resignation of then-Defense Secretary Jim Mattis, who had brought Rood into the top policy job.

“Very few Mattis people are left, which means very few people to push back,” another former official said. “The White House does not want contrary views.”

A spokeswoman for Rood at the Pentagon declined to make him available for comment.

Rood’s departure caps a period of high turnover in the Pentagon’s policy shop caused by numerous departures and lengthy vacancies. Rood has not had a permanent top deputy since his former No. 2, David Trachtenberg, departed last summer, and many other positions are being filled by officials in an acting or a temporary capacity — including three of the five assistant secretary positions under Rood.

The top policy position for the Middle East has been vacant since December, despite significant upheaval following the Trump administration’s killing of Iranian Quds Force leader Qasem Soleimani last month.

Josh Dawsey contributed to this report.