During the 2016 presidential campaign, the criticisms of Donald Trump came thick and fast: that he was a political amateur, inexperienced in the ways of government, a babe in the swamp of Washington. And yet, he steamrolled his GOP opposition and crushed Hillary Clinton in the Electoral College. In the 18 months since his inauguration, taxes have been slashed, the economy has boomed and “now hiring” signs have sprouted from coast to coast.

Now it’s Trump’s turn to shine on the foreign policy stage. His early overtures to Russia were frustrated by the Democrats’ as-yet-unproven “collusion” charge, but his brand of personal diplomacy with other adversaries has paid off via his carrot-and-stick treatment of China’s Xi Jinping and, most spectacularly, North Korea’s Kim Jong-un. Trump had the former Little Rocket Man eating out of his hand at the summit last week in Singapore, where the pair signed a four-point document including a pledge to work toward the denuclearization of the Korean peninsula.

How does he do it? Simple: the Big Dog takes what he wants. Trump puts his best offer on the table first, and then snatches it away at the first sign of hesitation — as he did with Kim in the run-up to the summit. He has no interest in acceding to diplomatic niceties unless (as in his flattery of Kim in Singapore) they further American national interests. Best of all, he doesn’t care who knows it or what they think about it.

Let the sniping begin! “Shockingly weak,” “reality TV,” “a joke,” nattered the usual nabobs of negativism of the Trump-Kim agreement. What had been unthinkable for more than half a century — the American president shaking hands with the leader of the Hermit Kingdom — was suddenly deemed both unremarkable and insufficient. And then, the dogs having barked, and the president’s accomplishment dismissed, the caravan moved on to carp another day.

Because, for the rabid Trump haters, there’s always something to froth about. Before the Singapore summit, the president had infuriated the usual establishment suspects with an offhand remark that he didn’t need much prep work before engaging with Kim, enraging the credentialists, whose outlook on life was formed in late-night cram sessions back at Harvard. That Trump was bringing a lifetime of experience in taking the measure of his man across a bargaining table never occurred to them.

Why, they exclaimed, just look at the hash he made at the G-7 conference in Canada before departing for his rendezvous with Li’l Kim to end the Korean War — Trump’s imposition of tariffs and his refusal to sign the final communique, they complained, had “alienated” some of America’s oldest allies and set off fears of a trade war.

International diplomacy is not a popularity contest or a sewing circle

The pièce de résistance of outrage stemmed from the president’s typically Trumpian parting shot on Twitter slamming Canada’s beta-male prime minister, Justin Trudeau, as “weak and dishonest” and “meek and mild.”

In short, Trudeau, the French popinjay Emmanuel Macron and the colorless Theresa May are now getting the same treatment that, so far, has helped bring Xi and Kim to the table. A pat on the head here, the back of Trump’s hand there, until his opponents realize their best interests actually align with America’s and getting with the program is their best guarantee of self-preservation.

Germany’s chancellor, Angela Merkel, can threaten “resistance” to America all she wants, but any “trade wars” will be nasty, brutish and short, and end with a humiliating climbdown by the European leaders.

In their obsessive quest for “stability,” our Foggy Bottom bonzes forget that nothing lasts forever, including — especially — alliances. Trump’s early skepticism regarding NATO was well-founded, since the North Atlantic Treaty Organization has long outlived its usefulness as a check on Soviet power, but zombie NATO staggers on, even as our European “allies” fail to live up to their obligations to spend at least 2 percent of GDP on defense.

In the past, America has fought wars against Britain, Germany, Japan, Italy, France (during the French and Indian War) and, yes, Canada. At the same time, a war that began in Korea in 1950 may soon be, legally, over. And a fading Russia has already been supplanted in the geopolitical arena by China. Things change.

Trump and his foreign-policy team of Mike Pompeo and John Bolton understand the truth of this dictum from former British Prime Minister Lord Palmerston: “Nations have no permanent friends or allies, they only have permanent interests.” International diplomacy is not a popularity contest or a sewing circle. Instead, it’s a pit-bull arena in which the toughest breed comes out on top and the rest succumb, fall in line or slink away. Always bet on the big dog.

Michael Walsh is an author, screenwriter and contributing editor at PJ Media and American Greatness. His new book, “Fiery Angel,” is out now.