Samuel Johnson famously said, and almost meant, that “patriotism is the last refuge of a scoundrel.”

Nuance ruins zingers, but the writer and proud Englishman was not deriding love of country, per se, just those who pay lip service to the idea while undermining the country they claim to love – “that pretended patriotism,” his biographer James Boswell tells us in a helpful gloss, “which so many, in all ages and countries, have made a cloak for self-interest.”

Does any of that sound familiar? Amid the tangled debate over U.S. President Donald Trump’s professed “nationalism,” and the meaning and ownership of the term, it should.

Story continues below advertisement

The idea of loving one’s country and preferring it to others – call it nationalism or patriotism, according to taste – is beleaguered right now.

At the moment, it is mainly espoused by politicians and thinkers on the far right. In the United States, Mr. Trump and his former aide Steve Bannon are the most prominent figures to don the “nationalist” mantle; in Europe, the label is claimed by neo-fascists.

Partly as a result, some on the left now view “nationalism” as automatically discreditable, a word such as “sexism” or “racism” whose badness is a given.

Emmanuel Macron, the leader of endlessly prideful France, condemned nationalism during a speech commemorating the centenary of the end of the First World War on Sunday. He was widely applauded for it.

This is an interesting lexical development – the word is complex and can change cast depending on who is speaking it. The current debate reflects that.

But as a political development, it is more worrying. Nationalism, at its best, represents something valuable, and something that most people continue to feel in some form. Liberals need a better response to the rise of malevolent, racist nationalism than to simply stigmatize the feeling and those who feel it.

There’s no question that nationalism can lead to awful things. It was the ghost in the machine of the First World War, as Mr. Macron pointed out, not to mention a bloody litany of other wars.

Story continues below advertisement

Economic nationalism can stifle and warp relations between countries. Scores of Chinese trading partners can tell you it’s a recipe for the bullying of currency manipulation and industrial espionage.

The fearful ethnic nationalism of Mr. Trump and the European far right sows the belief that some members of the nation are more worthy of membership than others.

And yet there are more wholesome versions of nationalism. The U.S. Constitution expresses the hope for a country not based on ethnicity, with equality of citizenship for all.

Closer to home, we practise the good kind of nationalism when we question an investment from Beijing that risks compromising national security, or when we accept Syrian refugees because it is not only the right thing to do but also something we choose to define as a “Canadian” thing.

National feeling helps countries protect themselves against commercial and military predation. It also helps reinforce their best, most distinctive qualities. Our medicare and immigration systems remain as strong as they are not only because they help people, but also because Canadians are proud of them and see them as part of their identity.

Maybe most importantly, nationalism is a fact of life. Most people harbour a gut-level attachment to their country of birth or choice. It’s akin to the feelings we have for friends and family. Some may think such sentiments are retrograde and better outgrown, but, in the meantime, it won’t do to cede the ground to those peddling nationalism’s worst version.

Story continues below advertisement

As countries across the world retreat into a resentful nationalism or lurch into the aggressive kind, Canada offers a vision of a more nourishing love of country: one that puts no stock in skin colour or ancestry, accommodates a world’s worth of cultural practices and is eager to co-operate with other countries on an equal footing. It is a nationalism that draws its ardour from past accomplishments and a common future, not from some mystical folk ideal or mutually tended grievance. A love of country that is “real and generous,” as Mr. Boswell puts it.

Without presuming to improve on Dr. Johnson’s aphorism, Canada suggests a reply: It’s not patriotism or nationalism we need to worry about. It’s the scoundrels.