The State Department is pulling the US ambassador to Zambia after the president there objected to his harsh criticism of the government's record on corruption and gay rights.

US Ambassador Daniel Foote to those in Zambia who compared homosexuality to bestiality and said he was stunned by the "venom and hate" he received for condemning the sentencing of two men to 15 years in jail for being in a same-sex relationship. 

Same-sex relationships are currently outlawed in the African country.

"The current government of Zambia wants foreign diplomats to be compliant, with open pocketbooks and closed mouths," Foote wrote, adding that the US provides "$500 million in annual American, debt-free support to the Zambian people."

When approached by the BBC, the US State Department neither confirmed nor denied that the ambassador had been withdrawn but did say that it was "dismayed by the Zambian government's statement that Ambassador Foote's position 'is no longer tenable', which we consider to be the equivalent of a declaration that the Ambassador is persona non grata."

"[President] Lungu said he does not want to work with the man [Mr. Foote], and so there was no point in him remaining here," an unidentified source told AFP. "Remember that there are issues of security and so Washington want their man back. We do not expect a replacement soon."

The Zambia government maintains its stance and appears to be unbothered by the move.

"We don't want such people in our midst. We want him gone," President Lungu said.