The US has recalled its ambassador to Zambia after he called the imprisonment of a gay couple "horrifying" and accused authorities of corruption.
Daniel Foote, a career diplomat appointed by the Trump administration in 2017, had issued a strongly worded statement criticising the 15-year sentences handed down to two men for being in a relationship. Homosexuality is illegal in Zambia.
He also said he was shocked by the "venom and hate" he said he had been subjected to since raising the issue.
Mr Foote threatened to cut US aid to Zambia after its president, Edgar Lungu, defended his anti-gay stance in an interview with Sky News. Mr Lungu said: "We know that there could be people who are homosexual in Zambia but we don't want to promote it.
"We frown on it... the practice... most of us think it's wrong ... it's un-Biblical and un-Christian ... and we don't want it.
"Even animals don't do it so why should we be forced to do it... because we want to be seen to be smart, to be seen to be civilised and advanced and so on."
The ambassador also accused the government of misappropriating millions of dollars. The US gives Zambia about $500 million a year in aid.
In his statement Mr Foote acknowledged that he had no right to interfere in Zambian policy-making but wrote: "I thought, perhaps incorrectly, that Christianity meant trying to live like our Lord, Jesus Christ.
"I am not qualified to sermonise, but I cannot imagine Jesus would have used bestiality comparisons or referred to his fellow human beings as 'dogs', or 'worse than animals'; allusions made repeatedly by your countrymen and women about homosexuals.
"Targeting and marginalising minorities, especially homosexuals, has been a warning signal of future atrocities by governments in many countries. In my heart, I know that real Zambian values don't merit your country's inclusion on that list, ever."
He was recalled after the Zambian government made it clear his position was "no longer tenable".
Mr Foote's removal from his post comes seven months after the US ambassador to Ukraine, Marie Yovanovitch, was recalled from Kiev. Ms Yovanovitch, who was also a vocal critic of corruption, claimed she had fallen foul of efforts by Rudy Giuliani, Donald Trump's personal lawyer, to dig up dirt on his political opponents.
In July the British ambassador to the US, Kim Darroch, resigned after the leak of diplomatic cables in which he had reported negative comments about Mr Trump and his administration.
Zambia, a former British colony, is a member of the Commonwealth.
It is one of 71 countries in the world, including more than 30 members of the Commonwealth, which criminalises homosexuality.