Michael McKinley, a career diplomat and senior adviser to Secretary of State Mike Pompeo, has resigned his position amid rising dissatisfaction and plummeting morale inside the State Department over what is seen as Pompeo’s failure to support personnel ensnared in the Ukraine controversy.

A senior officer who has held a range of diplomatic posts, including ambassador to Afghanistan, Colombia and Peru, McKinley was serving as ambassador to Brazil last year when Pompeo recruited him as a policy adviser and a conduit between his office and the career service.

Pompeo was expected to issue a statement Friday announcing the departure.

McKinley declined to comment Thursday evening.

Among the many issues in which he played a role, McKinley has been closely involved in administration policy on Venezuela, Mexico, Southeast Asia and Afghanistan, where last month President Trump abruptly canceled U.S. peace negotiations with the Taliban that both sides had said were near an agreement.

A person familiar with the situation said McKinley felt that Pompeo had been a positive force compared to his predecessor, Rex Tillerson, in terms of encouraging alternative views within the department, as well as lifting a Tillerson freeze on promotions and prohibitions against spouses working abroad.

Although he had no direct involvement with Ukraine, part of McKinley’s job involved taking the temperature of the building for Pompeo. Like many others, he was disappointed in the secretary’s lack of public support for diplomats who have been named in the Ukraine controversy and called to testify before House committees conducting the impeachment inquiry into the actions of Trump and his personal attorney, Rudolph W. Giuliani.

Concern has been especially high for Marie Yovanovitch, the U.S. ambassador to Ukraine whom Pompeo recalled from her post when a right-wing media campaign accused her of disloyalty. Yovanovitch had questioned Giuliani’s efforts to press Ukraine to investigate Trump’s political rivals.

Giuliani has said that Trump ordered Pompeo to fire her. In his July telephone call with Ukrainian President Volodymyr Zelensky that is at the center of the impeachment investigation, Trump called Yovanovitch “bad” and said “she’s going to go through some things.”

Now a fellow at Georgetown University on leave from the State Department, Yovanovitch is scheduled to give a deposition to investigating committees on Friday.