LUSAKA (Reuters) - Zambia’s home affairs minister said on Tuesday that a U.S. ambassador who criticized the jailing of a gay couple for 15 years had “crossed the line,” adding that the United States had responded to an official complaint by recalling him.

A court in the southern African nation last month sentenced the couple under the country’s harsh colonial-era sodomy law.

Ambassador Daniel Foote said he was “personally horrified,” adding: “meanwhile, government officials can steal millions of public dollars without prosecution, political cadres can beat innocent citizens ... with no consequences, poachers can kill numerous elephants... and face a maximum of only five years.”

A furious President Edgar Lungu said publicly that he had complained to his American counterpart Donald Trump over the ambassador’s comments. Embassy sources on Monday said Foote had been recalled. The embassy declined to give official comment.

“The dos and don’ts for those who represent nations in other nations are very clear. So if one crosses the line, it’s not about bilateral relations between the two countries,” Home Affairs Stephen Kampyongo told Hot FM radio.

“They (Washington) listened to the complaint,” he said.

An embassy source on Monday told Reuters that Washington had decided to recall its ambassador because it was difficult for him to work in Zambia if his hosts did not want him.

Over the past decade, several African countries have come into conflict over LGBT rights with Western countries, many of which are paying a lot of their bills. The previous U.S. Obama administration cut aid to Uganda and Malawi over homophobic laws and policies, although Western condemnation sometimes provokes African leaders into taking more hardline positions.

Uganda announced plans in October for a bill that would impose the death penalty for gay sex, but it later backtracked after major aid donors said they were monitoring the situation.

Zambia receives hundreds of millions of dollars every year in financial support from the United States, some of which goes toward fighting HIV/AIDS.