For three decades, whenever he delivered talks on NATO and U.S. foreign policy, scholar Stanley R. Sloan was always proud to note that he could criticize his own government freely — and, in fact, was often invited by the State Department to do just that at venues around the world.

That’s what he had expected would happen on Tuesday, when the former CIA officer was set to deliver a keynote speech at a Danish think tank’s conference, meant to celebrate the 70th anniversary of the landmark alliance of North American and European countries, including the United States.

But there was just one problem: Carla Sands, the U.S. ambassador to Denmark, wanted Sloan removed from the event — reportedly over criticism that the academic had leveled at President Trump on Twitter.

Rather than follow her orders, the Danish Atlantic Council went a step further: On Sunday, it canceled the conference entirely.

Now, the episode has critics questioning the United States’ attitude toward public diplomacy, scrutinizing the qualifications of the former chiropractor and actress appointed by Trump to head the embassy, and pointing to the incident as “a weakness in our democracy,” as Sloan put it.

“We’ve sold ourselves as being the ‘shining city on a hill.' What the embassy is doing on behalf of the president is not showing those values,” he said in an interview with The Washington Post.

Neither the State Department nor the U.S. Embassy in Denmark, which was supposed to co-host the conference, immediately responded to a request for comment.

Sloan, a former CIA analyst who is a fellow at the Atlantic Council and a visiting scholar at Middlebury College, is widely considered one of the foremost experts on NATO. His 2018 book, “Defense of the West,” tracked transatlantic relations from the late 1940s through the present.

When the Danish Atlantic Council needed a last-minute replacement for a speech on the future of NATO for the treaty’s 70th anniversary, Sloan was a natural fallback.

On Dec. 1, he received a letter from Sands and the council’s head, Lars Bangert Struwe, inviting him to the conference, which was set to host 100 attendees from the Danish government, business world and other spheres of influence. Sloan booked his ticket to Copenhagen and began preparing a speech on liberal democracy and the future of NATO.

Sands, however, was reportedly less excited about his appearance. In a Twitter thread about the incident, the U.S. Embassy in Denmark said while it had worked with the Danish Atlantic Council to draft a program of speakers, reflecting a broad range of stances on NATO, the think tank went behind its back to pull in Sloan.

“Sloan’s proposed last-minute inclusion in the program,” the embassy said, “did not follow the same deliberative process of joint decision-making and agreement that we followed when recruiting all other speakers.”

But Struwe denied such a process had even existed. When it came to selecting the conference’s 10 other speakers, he told The Post, the embassy had no role in choosing whom to invite or in confirming their attendance at the conference, despite footing the bill for the event.

What happened after that, though, is indisputable: Sands, who was also set to speak at the summit, went through “official channels” to communicate to the think tank she did not want Sloan to speak at the conference.

According to Sloan, the ambassador — a former star on the soap opera “The Bold and the Beautiful” who was appointed by Trump after donating to his presidential campaign — had seen Sloan tweet criticisms of Trump during the recent NATO summit in Britain.

Indeed, Sloan said he planned to bring some of these issues up in Copenhagen, examining how the polarizing president might affect U.S.-European relations.

For the Danish Atlantic Council, that was not much of an issue.

“We have all the time known that Mr. Sloan has a critical approach towards President Donald Trump. That is no secret,” Struwe said in a statement announcing the event’s cancellation. “We have, however, never doubted that Mr. Sloan at our conference would deliver an unpolitical and objective lecture.”

The think tank head was nonetheless faced with a difficult choice: Should he continue with the event, bowing to Sands’s request? Or cancel it entirely?

Early on Saturday, Struwe wrote to Sloan that Sands’s veto had forced his think tank to rescind his invitation to him. On Sunday, however, he made the decision to cancel the conference entirely.

“After serious consideration, we have decided not to proceed with the Conference,” he said on Twitter. “The progress of the process has become too problematic; and therefore, we cannot participate in the conference, let alone ask our speakers to participate.”

Struwe said in an interview that he wanted to protect the speakers’ right to share their opinions, and the public’s right to hear those diverse perspectives. The controversy over Sloan’s appearance would have distracted from the theme of the event and instead turned the summit into yet another referendum on the American leader.

“We could end up having a discussion for or against Mr. Trump,” he said, “but that has nothing to do with what we wanted to talk about.”

It’s not unheard of for academics to have their invitations canceled to think tank events, Struwe added, although the incident marks a first for the Danish Atlantic Council. Globally, he said, the cancellation may be one of the first such incidents to be so motivated by U.S. politics.

As for Sloan? Upon learning that he would not be heading to Copenhagen this weekend after all, he posted the text of his speech to Facebook. In an address on “internal and external challenges facing the alliance,” he wrote that Trump did not create the issues facing NATO, but did bring them to a head.

He immediately drew strong support from both American and Danish readers, he said, who praised what he had to say.

“I’ve been saying it may be the most famous speech never delivered in Denmark,” he quipped.