This Independence Day, instead of despairing over the country’s division, Americans might take a moment to consider that independence includes having the right to disagree without hatred or violence.

Since the 2016 presidential election, there’s been no shortage of mass protest. First came the Women’s March, drawing millions to cities across the country. A year later, the March for Life, history’s largest pro-life gathering, drew hundreds of thousands to Washington, DC. And in March of this year, hundreds of thousands converged on our nation’s capital for the March for Our Lives, led by survivors of the mass shooting at Marjory Stoneman Douglas High School in February.

While these marches’ messages and goals can be hotly debated, in each case, witnessing massive numbers of Americans peacefully assemble to express their views on controversial issues at a time when the country is deeply divided along political lines has been reassuring, because it indicates a healthy respect for dissent and our country’s strength to tolerate broadly diverging views.

As the country’s political schism deepened, lines were crossed.

The worst cases were violence. At a protest against the removal of a Confederate monument in Charlottesville, Va., a man drove his car into a crowd of counterprotesters, killing 32-year-old Heather Heyer. And there was the politically motivated shooting of Republican House Majority Whip Steve Scalise and four others at a baseball field by a man police said was targeting Republicans.

While those cases are extreme, the trend of intolerance is becoming the norm. Late last month, White House Press Secretary Sarah Huckabee Sanders and her family were asked to leave a restaurant. That same weekend, Rep. Maxine Waters urged supporters to “create a crowd” and “push back on” Trump cabinet members and their families in public places.

Closer to home, in everyday ways, political prejudice is seeping into the social fabric.

It’s not unusual, for instance, on New York-based dating sites to see exhortations for “Trump supporters” or “libtards” to swipe left, and even “Trumpettes: Don’t procreate.”

Last year, a Pennsylvania man was kicked out of an East Village bar for wearing a “Make America Great Again” cap.

Total intolerance for associating with people who hold different political views from one’s own is rude, but more important, it disrespects the principle of freedom, since what freedom exists without room for disagreement about politics?

Rudeness aside, it’s worth reflecting this July 4 on the folly of using our freedoms against each other.

“Because we have freedom of association, this kind of ideological discrimination is not illegal, but it is not civil,” said Irina Tsukerman, a New York City human-rights attorney who frequently represents asylum-seekers. “Americans have a responsibility to be able to critique ideas while also recognizing the humanity of the individuals who express those ideas.”

Anxiety about the new political prejudice is reflected in popular culture, too; gone is the era of Fourth of July blockbuster films like “Independence Day” featuring Will Smith saving the world from a hostile takeover by aliens; instead, this year’s big July 4 release is “The First Purge,” a thriller about a night Americans are invited by their government to participate in a politics-fueled killing spree.

Americans’ ability to disagree vehemently but uphold and treasure our freedoms, and those of fellow Americans, sets a far better example for the world than the one we’re increasingly setting these days.

Take Yom Deng, 29, a children’s- and women’s-rights activist from South Sudan who is seeking political asylum here in the United States. Deng was, she says, severely beaten by three members of the secret police after South Sudan declared its independence in July 2011.

“It is so important to coexist and tolerate each other . . . in a peaceful way, to reflect and consider other human beings’ side of the story and how they feel,” Deng tells me.

The good news is that Americans are blessed with a Constitution that protects freedom of conscience and freedom of speech.

Since true independence of thought will always guarantee a range of political views, let’s not be afraid of our opponents’ points of view. In the words of John Stuart Mill, “He who knows only his own side of the case knows little of that.”

And in between corn on the cob and fireworks, let’s take a moment to pause, and show gratitude, for the principle of freedom — for ourselves and our fellow Americans — that transcends the divide.

Heather Robinson is a New York-based journalist.