Jill Filipovic is a journalist based in New York and author of the book " The H-Spot: The Feminist Pursuit of Happiness ." Follow her on Twitter . The opinions expressed in this commentary are solely her own. View more opinion articles on CNN.

(CNN) Corrupt and bigoted leaders worldwide have learned an important lesson from President Donald's Trump administration: They may have a friend in America. And American civil servants have learned a lesson, too: they might not.

The Trump administration's penchant for siding with shady actors over US interests isn't just apparent in the President's dealings with Ukraine, where, thanks to impeachment hearings and dogged reporting, it has become increasingly clear that US aid was withheld as an incentive to convince the Ukrainian government to investigate one of Trump's political rivals. (Nonetheless, the President continues to deny wrongdoing.)

Nor is it limited to the administration's friendly relationship with Saudi Arabia, despite that country's atrocious human rights record , and evidence that the nation's de facto ruler, Crown Prince Mohammed bin Salman, ordered the murder and dismemberment of a dissident journalist residing in the United States (all of which the Crown Prince continues to deny).

This week, the Trump administration recalled the American ambassador to Zambia, Daniel L. Foote. Foote's apparent misstep? He criticized the Zambian government for imprisoning gay men and voiced serious concerns about government corruption.

Foote's claims, though, were true -- there is not a question that the country does indeed jail people for homosexuality. Various groups have repeatedly noted Zambia's corruption, and an assortment of European governments suspended aid to the country in 2018 because of embezzlement schemes

Foote's claims were also in line with the American values that ambassadors are supposed to promote abroad. Zambia has extreme anti-gay laws , and recently sentenced two men to 15 years in jail for the crime of having sex. After Foote criticized those laws, he found himself on the receiving end of a national campaign of harassment, to the point that he was unable to attend World AIDS Day events out of fear for his physical safety.

He released an extraordinary statement about the events, voicing his concern over "discriminatory and homophobic laws," which he pointed out fueled the same HIV/AIDS crisis that US money was given to fight. Even though HIV is an equal-opportunity disease, being outed as HIV-positive remains stigmatized in part because it's associated with homosexuality.

Laws criminalizing LGBTQ people, in other words, are bad on their face because they're hateful and discriminatory, but they also have significant and negative public health implications.

Foote also criticized the filtering effect of Zambian state-run media -- Zambia has spent the past few years cracking down on its free press , prosecuting reporters and threatening journalists -- and directly confronted the false claim of a warm and friendly relationship between the United States and Zambia.

"The current government of Zambia wants foreign diplomats to be compliant, with open pocketbooks and closed mouths," he wrote, explaining that the Zambian officials have long misappropriated millions of dollars in donor funds meant for the public. Now, the Zambian government has stacked up significant debts, the details of which are closely held -- money that, Foote rightly says, is likely being pilfered without accountability mechanisms in place.

Zambian President Edgar Lungu responded by complaining to the Trump administration, and telling Sky News , "If that is how you are going to bring your aid, then I'm afraid the West can leave us alone in our poverty. And we'll continue scrounging and struggling."

Instead of backing up their ambassador, the US undercut him.

A State Department spokesperson released a statement saying that the department 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... The United States firmly opposes abuses against LGBTI persons." And yet the ambassador was still recalled.

The ambassador's comments were indeed harsh. And after Lungu made it clear that Foote was persona non grata in the country, it was difficult to see how that relationship would continue to be productive. But what's also clear is that the relationship wasn't all that productive to begin with -- that Zambia's endemic corruption and its human rights abuses compromised the ability of the government to provide for its people, and compromised US aid dollars.

A more responsible course would be for the American government to back up its own ambassador, making clear that American diplomats will indeed have the space to voice American values -- basic things like "don't put gay people in jail" and "don't steal aid money" -- even when inconvenient for a host country.

Get our free weekly newsletter Sign up for CNN Opinion's new newsletter. Join us on Twitter and Facebook

After all, the American ambassador was tasked with promoting American values.

That means the freedom to speak one's mind and criticize the powerful. It means esteeming a free press, the freedom to practice one's own religion and the freedom of consenting adults to make their own private sexual decisions. It means strongly opposing the targeting of minority groups out of religious bigotry.

But we should claim them as values nonetheless. And we should all take note -- and get nervous -- when the administration currently sitting in the White House is happy to weaken American ideals seemingly in favor of kleptocracy and hate.