Reviving this older stream of dissenting rests on the active interests and lost authority of its citizens and its fading democratic values. This would replace “my country right or wrong” with the centuries-long struggle, as the Rev. Dr. Martin Luther King Jr. put it, “to be true to what you said on paper.” This is the position from which voting rights, civil rights, immigrant rights and economic rights can be fought: with a vision of what is acceptably American and what is not. Decent people will rise to the challenge.

The nation is the only “imagined community,” as Benedict Anderson put, where everything from mass transit to health care to wealth distribution to a green economy can find traction. A rejuvenated national vision would transcend the backward-looking — and often reactionary — search for an America in arrested decay that has too often informed politics since Ronald Reagan first promised to make America great again.

Civic patriotism must also be an aspirational story of struggle and inclusion. The narcissistic and racist politics of right-wing nationalism must be challenged with an expansive and inclusive civic vision about hope and potential. It’s what Barack Obama spoke of at the 50th anniversary of the Selma march. Standing before the Edmund Pettus Bridge, he asked, “What greater form of patriotism is there than the belief that America is not yet finished, that we are strong enough to be self-critical, that each successive generation can look upon our imperfections and decide that it is in our power to remake this nation to more closely align with our highest ideals?”

To be sure, the rhetoric of nationalism can be dangerous in a place with a history of settler colonialism, slavery, anti-immigrant hysteria and territorial expansion. Any civic framing risks fomenting exclusion by drawing lines between those who are in and those who are out — an especially profound problem in an era of mass migration. Yet when the American left abandons any vision of social patriotism because of the racist ugliness it has come to symbolize, it concedes the American story to the voices of exclusion and avarice.

The pragmatist philosopher Richard Rorty made many of these arguments 20 years ago in a book, “Achieving Our Country.” That book became famous after the 2016 election for having predicted the rise of a “strongman” to fill the void in national politics. He feared that indulging in cultural politics rather than emphasizing the material interests of American working people, and surrendering the struggle to shape the national vision where that can happen, would lead to such a catastrophe. While his nightmare of the nationalist demagogue has come to pass, few people are talking about the foundation of his predictions.

Patriotism may well be the last refuge of the scoundrel, but as a pragmatist like Mr. Rorty would tell you, it is too powerful and too important to leave to the scoundrels. Voters are in search of a place of vision for average Americans, a place of idealism in an age of cynicism, a place of unity in a time of fracture and a place where policy can be embedded in something greater than technocracy.

While commentators are getting worked up over the revival of “socialism,” an increasing number of insurgent blue-collar Democrats across the country are looking to recapture a sense of nation. The dark-horse candidate from Kansas, the Army veteran James Thompson, for instance, promises to “Fight for America.”

As we approach midterm elections, we urgently need to hear these messages in good faith and rise to their challenge.

Jefferson Cowie is a professor of history at Vanderbilt University and the author, most recently, of “The Great Exception: The New Deal and the Limits of American Politics.”

Follow The New York Times Opinion section on Facebook and Twitter (@NYTopinion), and sign up for the Opinion Today newsletter.