The United States recalled its ambassador to Zambia on Monday after he criticized the government for sending a gay couple to prison, and accused officials of stealing millions of dollars of public funds.

Ambassador Daniel L. Foote had described the treatment of the gay couple as “horrifying” — setting off outrage in Zambia, a conservative Christian country. But analysts said that the main reason for his departure was that he had repeatedly declared that ministry officials had misappropriated millions.

In an unusually combative public statement for a member of the diplomatic corps, Mr. Foote had said that the Zambian government “wants foreign diplomats to be compliant, with open pocketbooks and closed mouths​.”