President Trump gave a notably unifying State of the Union address that didn’t back down an inch from his controversial nationalism.

This might sound like a contradiction. It’s not. It’s a step toward fulfilling the political promise of his style of nationalism that could appeal much more broadly than to Trump’s intensely devoted base.

Nationalism shouldn’t be synonymous with Trump’s crudity of expression. It doesn’t mean yelling at rallies, or tweeting inflammatory messages, or insulting political adversaries — all of which could more legitimately be pinned on Trump’s populism, or more fundamentally, his personality.

Rather, it’s an American tradition that runs through Alexander Hamilton, Teddy Roosevelt and Ronald Reagan.

A true American nationalism should be grounded in our common citizenship, champion popular sovereignty and exult in our history, culture and ideals.

To say that Trump has often fallen short of these standards is an understatement. With Trump, the theory has always been racing, haphazardly, to catch up to his instincts, and risks getting overwhelming by his outrageousness.

What’s the difference between nationalism and patriotism? The scholar Gregory Jusdanis offers a definition in which nationalism is the substantive political expression of the positive emotion we call patriotism.

There are countless ways to slice it. The great neoconservative intellectual Irving Kristol wrote in the 1980s, “Patriotism springs from love of the nation’s past; nationalism arises out of hope for the nation’s future, distinctive greatness.”

There are only a few things that human beings will give their lives to protect — their family, their faith and their country among them.

Nationalism had always been part of conservatism’s appeal, although contemporary Republicans lost touch with it under the influence of tendencies that became more important in recent decades: libertarianism, humanitarian universalism and the cosmopolitanism of a globe-trotting business elite.

For the left, nationalism has become a swear word — a crimped, small-minded perspective tinged with racism. It associates nationalism with the rise of fascism in 20th-century Europe, and considers any expression of it as borderline dangerous.

If nationalism were tantamount to fascism, though, England and America — the countries that forged modern nationalism, as we know it — would have succumbed to jackbooted thugs a few centuries ago. Instead, the idea that the nation belonged to the people rather than the crown led to the curtailment of the monarchy in England and its end in America.

The first sentence of the Declaration of Independence is the announcement of the arrival of a nation-state, assuming a “separate and equal station” in the world. From the very beginning, America had a prickly pride, a belief in its own greatness and mission, a hatred of foreign interference and an abiding belief that it should be self-governing.

American nationalism has had different and competing permutations down through the centuries, but there is no need to invent a nationalist tradition in this country; it need only be rediscovered and renovated.

This is the larger intellectual challenge for Trumpism. In sheer political terms, Trump began to set out a palatable nationalism in the State of the Union.

During the address, you could hear the teeth-grinding among Democrats when Trump declared, in a reference to the Dream Act, “Americans are dreamers, too.”

Immigration is such a flashpoint in the Trump era because it’s the domestic policy issue that most directly involves the clash of worldviews between cosmopolitanism and nationalism.

The cosmopolitans believe that the test of our immigration policy ought to be whether it is good for the immigrants coming here; the nationalists believe that the test ought to be whether it is good for the national interest and people already here.

Trump took the old trope of Ronald Reagan’s of recognizing exemplary people in the balcony and extended it to its maximum possible extent. The speech was almost a long disquisition on ordinary heroes, each illustrating a theme of the speech.

He ended by hailing people from all walks of life, saying, “above all else, they are Americans. And this Capitol, this city, and this Nation, belong to them.”

If he resolved to routinely live up to that sentiment, he would do himself, and our political culture, immeasurable good. In political terms, it isn’t Trump the alleged tool of the Russians or Trump the budding dictator whom Democrats have to fear most; it’s Trump the nationalist unifier.

Twitter: @RichLowry