Multiple news outlets last week reported on a 2018 video recording in which two men with Ukrainian connections, Lev Parnas and Igor Fruman, apparently inform President Donald Trump that the U.S. ambassador to Ukraine, Marie Yovanovitch, was undermining his policy and asserting that he soon would be impeached.

In response, Trump reportedly ordered: “Get rid of her.”

Unsurprisingly, this recording became part of the broader impeachment debate, which accuses Trump of abuse of power, even though Yovanovitch herself acknowledges that she “served at the pleasure of the president.”

The Constitution vests the president with the authority to appoint ambassadors, with the Senate’s advice and consent. Although not explicitly mentioned in the Constitution, the authority to remove officials is consistent with that authority, along with the president’s position as the head of the executive branch.

Indeed, although the removal power has a convoluted and complex history, it is strongest where the president’s constitutional authority—such as in the conduct of foreign affairs—is explicit and broad.

Moreover, Congress has explicitly endorsed the president’s authority to remove and reassign ambassadors though the Rogers Act of 1924 and the Foreign Service Act of 1980, which established the rules, mission, and parameters of the U.S. Foreign Service.

Indeed, the U.S. Code (Title 22, Chapter 52, §3941(d)(2)) makes explicit that “Chiefs of mission, ambassadors at large, and ministers serve at the pleasure of the President.”

Congress was correct to support this authority. In addition to their diplomatic and bureaucratic duties as head of a U.S. Embassy under the State Department, U.S. ambassadors serve as the president’s personal representative to a foreign head of state and government.

Ambassadors are understood to speak for the president, and for this reason, serve at the president’s discretion. A relationship of less than full confidence is incompatible with the role.

In practical terms, if a president lacks faith in an ambassador, there will be a strong incentive to circumvent him or her, possibly sowing discord and confusion.

The proper remedy, instead, is removal. Ideally, the president’s authority to remove ambassadors should empower the State Department by bolstering the president’s confidence that its officials will faithfully execute his policies.

People can disagree with the president’s tone or comportment, but it’s clear that Yovanovitch had lost the president’s confidence. As such, he was perfectly within his authority to call for her removal.