Then there is the speed of Trump’s move—he called Erdogan to offer his congratulations within hours of the referendum results being made public. American leaders often wait some time after the conclusion of a vote before calling the foreign counterpart involved, and the haste is especially notable in this case because the vote is still in dispute. Erdogan won by barely more than 2.5 percent, in a result that his opponents have vowed to contest, and which independent monitors from the OSCE, of which the U.S. is a member, said was the outcome of a deeply flawed process. The State Department also diverged somewhat from the White House, issuing a statement registering concern about the OSCE observations, calling on Turkey to “protect the fundamental rights and freedoms of all its citizens,” and pointedly saying that “commitment to the rule of law and a diverse and free media remain essential.”

So Trump’s phone call, and the statement that followed it, were unusual. But how unusual? The release of the readout was met with gasps from some observers, followed by eyerolling from other quarters. The fact is that the U.S. has long made accommodation with autocrats and repressive leaders, and American presidents have for years congratulated counterparts who won election through dubious electoral processes.

“The United States gets hung up on process,” said Tamara Cofman Wittes, a senior fellow at the Brookings Institution and former Obama State Department official. “There’s a very strong tendency in U.S. foreign policy to acknowledge and to congratulate for holding elections, even when those elections take place in a pretty unfair context.”

There are cases where this doesn’t happen, such as when Obama didn’t congratulate Tunisian President Zine El Abidine Ben Ali for winning a 2009 election widely viewed as rigged, but they are conspicuous by their absence and snubs are not unnoticed.

Moreover, there’s an obvious reason for the U.S. to be cozying up to Erdogan now, because Turkey is central to American strategy in fighting ISIS and, potentially, would be a key player in any expanded fight against the Syrian government. When the Trump administration began exploring strikes against Bashar al-Assad, Erdogan quickly said he would approve the use of Incirlik Air Base in Turkey as a departure point.

“Prioritizing near-term security cooperation over the democratic and human rights of one partner is commonplace in American foreign policy, and Trump’s action here is an exaggerated example that proves the rule,” she said.

President Obama tried for years to cultivate Erdogan as a liberal Islamist, an effort that ended in failure and in today’s increasingly authoritarian Turkey. Obama was supportive of Erdogan after a failed coup against the Turkish leader in summer 2016, but that’s not especially illuminating, since supporting an elected (if flawed) president against a military coup is clearly siding with democracy. More useful is examining the way Obama reacted to the rise of Abdel Fattah el-Sisi, the Egyptian president. Sisi came to power after a bloody military coup in 2013, followed by an election of dubious legitimacy: Sisi won with 97 percent of the vote. Here’s Obama’s statement:

President Obama called Egyptian President Abdelfattah al-Sisi today to congratulate him on his inauguration and to convey his commitment to working together to advance the shared interests of both countries. The President reiterated the United States’ continuing support for the political, economic, and social aspirations of the Egyptian people, and respect for their universal rights. President al-Sisi expressed appreciation for the call and welcomed U.S. support for the new government. The two leaders affirmed their commitment to the strategic partnership between the United States and Egypt and agreed to stay in touch in the weeks and months ahead.

This checks Wittes’s two boxes: It is a case of congratulating an autocrat in a flawed election, and that autocrat was an important American ally. (George W. Bush offered similar congratulations to then-President Hosni Mubarak in 2005, after Mubarak triumphed in an election in which he imprisoned his main opponent.)