Apparently annoyed at an NBC News report that he’d once considered a significant increase to America’s nuclear arsenal, President Trump on Wednesday made a comment that sounds like one that might have been uttered by an autocratic leader of a nation without a constitutionally protected press.

“It’s frankly disgusting the press is able to write whatever it wants to write,” Trump said during a meeting with Canadian Prime Minister Justin Trudeau. “People should look into it. . . . The press should speak more honestly.”

Framing the freedom of the press to cover what it deems important as “disgusting” is remarkable coming from any U.S. politician, much less the president while sitting in the Oval Office. But it serves as a reminder that, for all of the focus placed on Trump’s relationship with and emulation of Russian President Vladimir Putin, there’s another autocrat with whom he has had a friendly relationship and interests in common: Turkish President Recep Tayyip Erdogan.

Erdogan, perhaps more directly than Putin, moved early to line up allies in the Trump administration. In August of last year, Lt. Gen. Michael Flynn’s consulting firm entered into a business arrangement with Inovo BV, a Dutch consulting firm owned by a Turkish businessman with ties to Erdogan. At the same time, Flynn was a key aide to Trump. On the day of the election itself, Nov. 8, an opinion piece written by Flynn ran at the Hill. It was titled, “Our ally Turkey is in crisis and needs our support.”

“The U.S. media is doing a bang-up job of reporting the Erdogan government’s crackdown on dissidents,” Flynn wrote, “but it’s not putting it into perspective.”

The necessary perspective for Erdogan’s recent crackdown in his country is that Erdogan took advantage of an attempted coup to institute a state of emergency that resulted in the imprisonment of many of his enemies, real and perceived, and purges throughout the Turkish military. Earlier this year, Erdogan backed a vote to institute constitutional reforms that gave him broad new powers; the referendum passed narrowly in a cloud of suspicion over vote-rigging.

After that April vote, the Department of State called on Turkey to address those allegations and indirectly criticized the changes themselves. Trump, however, took a different tone when speaking to Erdogan by phone. According to the White House, Trump congratulated Erdogan on his electoral success — that is, in undercutting the country’s democracy.

Trump has, in fact, regularly championed Erdogan. In September, Trump said that Erdogan had “become a friend of mine” and that the Turkish leader was “getting very high marks” for his leadership. Mind you, this was months after Erdogan’s bodyguards physically assaulted American protesters in Northwest Washington, an event that led to a number of Erdogan’s men facing criminal charges. (That brawl occurred after Erdogan had met with Trump at the White House in May, an invitation that was itself controversial.) It was neither the first nor last time such an incident had occurred; during the U.N. General Assembly last month, Erdogan security staffers were seen aggressively handling protesters at a speech the Turkish leader was giving.

Trump, too, had a latent desire to see protesters at his events met with rough treatment. During the 2016 campaign, he regularly suggested that rally protesters should be roughed up, waxing nostalgic for a bygone time when such behavior would have resulted in being carried out of the venue on a stretcher. At one point, he offered to cover the legal bills of anyone who assaulted a protester who might throw objects at him.

Speaking to PBS NewsHour last month, Erdogan claimed that Trump had apologized to him for the criminal charges filed after the May incident, a claim that the White House later denied. That the claim seemed as though it might be possible is itself remarkable.

Trump’s comments about the media Wednesday come at an interesting time in U.S.-Turkey relations. Turkey arrested a worker at the U.S. Consulate in Istanbul, the second time this year that’s happened. More to the point, a Turkish court this week sentenced a reporter for the Wall Street Journal to prison for an article she had written about Turkey in 2015. The Committee to Protect Journalists tallies 81 reporters imprisoned in Turkey, largely in the wake of the coup attempt. That’s the largest figure for any country in the world.

The Journal reporter, who is in the United States, is not among them. Within hours of her conviction, though, Trump made his remarks about his frustration with the free press.

In many ways, Erdogan hasn’t gotten what he might have wanted from Trump, as our Adam Taylor writes. That may be due, in part, to the investigation into Russian meddling.

Shortly after Trump won the election, he named Flynn as his incoming national security adviser. Legally, Flynn had to declare that he was doing work on behalf of the Turkish government, but failed to do so until after he resigned from the administration. Before Trump was inaugurated, Flynn was reportedly asked to approve a military operation that was at odds with the goals of the Turkish government; he declined to sign off. Had he remained in his position, it’s not clear how the administration might have viewed issues like arming Kurdish fighters in Syria, which Erdogan opposes. But Flynn resigned, ostensibly because he misled Vice President Pence about his conversations with the Russian ambassador.

In September, Trump said of Erdogan, “I think now we’re as close as we’ve ever been.” This, too, is not the sort of thing one might expect an American president to say about an emerging autocrat. But, then, this is Trump.