Former Supreme Court Justices Ruth Bader Ginsburg and Antonin Scalia were on opposite sides of the political spectrum. Yet despite their obvious legal disagreements, the liberal Ginsburg once described herself and the conservative Scalia as “best buddies.”

This connection across ideological lines may seem surprising today. A striking feature of the current political moment is the extent to which it has affected personal relationships, with friendships fissuring over political issues.

In fact, a recent Pew study showed just how deep that divide has become. The survey found that roughly 40% of registered voters said that they do not have a single close friend backing a different presidential candidate.

The old mantra to “never discuss religion or politics” was a recognition that political differences can create awkward social situations. And research my colleagues and I conducted found that the mere prospect of discussing divisive topics can make you feel anxious and threatened.

Yet something about our current moment seems to have put a particular strain on our personal relationships.

As a social psychologist and communication researcher, I’ve noticed two key features of today’s political environment that are making friendships across the political divide challenging: the role of social media and the way in which political affiliations have become linked to morality and identity.

Antisocial media

While social media may have its benefits, it’s more difficult to have an in-depth, respectful discussion of issues while online. Written posts can be misinterpreted. The character limits of a tweet or post may prevent users from relaying the full complexity of their views, while the relative impersonality of online communication may make it easy to forget that there is a real person behind the screen.

Furthermore, media companies have financial incentives to keep people engaged and enraged. Messages that are more emotional are more widely shared, thus people are more likely to see posts that fuel outrage toward the other side. Divisive content may also originate with trolls or disinformation campaigns intentionally designed to increase social division.

Identity and morality

Second, it seems as though political issues are becoming more intertwined with individuals’ identities and sense of morality.

When being a supporter of a particular politician or party is a strong part of one’s sense of identity, it may be easier to view the other side in a negative way.

Humans have a need to belong and to be part of groups, and this “us versus them” mentality can arise even if people don’t have strong positions on political issues. Hearing a lot about politics as the election approaches keeps people focused on these identities.

Politicians or media outlets can reinforce this sense of conflict. Politicians often attempt to draw contrasts between themselves and their opponents, sometimes by disparaging the supporters on the other side, whether it’s Hillary Clinton’s “basket of deplorables” comment during the 2016 election or Trump’s regular barrage of Twitter insults, which have included retweeting a video in which someone says, “The only good Democrat is a dead Democrat.”

Then there are the issues that are highlighted. It’s one thing to disagree about tax policy. It’s quite another to disagree about whether certain groups deserve fundamental rights, or whether the other side supports “killing babies” or “locking kids in cages.”

When one person believes the policies and politicians supported by another person are inherently evil or immoral, it’s difficult to maintain a friendship.

Don’t forget the other 60%

On the hopeful side, the Pew survey suggests that six in 10 registered voters do have close friends on the other side of the political divide.

Just as so-called “red states” and “blue states” are all actually “purple states” – and contain people across the political spectrum – many Americans’ friendships remain intact, despite a stressful election cycle.

These reminders of shared affection and values may help bring the country together no matter the outcome of November’s contentious election.

This article was originally published on The Conversation.

Melanie Green is Professor of Communication, University at Buffalo, The State University of New York.