Charlie Neibergall / AP

The bad news is that the Republican Party will now almost certainly nominate the most dangerous presidential nominee in modern American history. The good news is that the Democratic Party is built to defeat him. The reason is straightforward. The Democratic Party has become, to a significant extent, an anti-racist party. The Republican Party has not.

In an anti-racist party, politicians who demonize historically discriminated-against groups are either forced into retirement or, at the least, forced to apologize. Obviously, what constitutes bigotry is not always self-evident. But if many of the members of a historically discriminated-against group perceive something as bigoted, that’s usually a good hint.

By that standard, the Democratic Party is significantly more anti-racist than it was even a few years ago. In the 1990s, Hillary Clinton could call African American criminals “super predators” without significant political blowback. Bill Clinton could eulogize his mentor, William Fulbright, without ever mentioning that Fulbright supported segregation. As recently as 2009, Barack Obama could choose Pastor Rick Warren, a man who tried to counsel people out of being gay, to give the invocation at his inauguration. In today’s Democratic Party, such behavior is much harder to imagine.

In the GOP, by contrast, it’s easy to imagine. Republican leaders may not be bigots. But they often tolerate bigotry. In 2012, Mitt Romney gratefully accepted Donald Trump’s endorsement, even though Trump had spent the previous year implying that Obama had only gotten into college because he was black, demanding Obama’s birth certificate, and suggesting that “maybe it says he is a Muslim.” In 2011, GOP presidential candidate Herman Cain said that, if elected, he would not appoint Muslims to his administration. Last year, Ben Carson said America should not elect a Muslim president. Trump himself infamously called for temporarily banning Muslims from entering the United States.

For a Democratic presidential candidate, such statements would be political suicide. But in today’s GOP, they are not. Many of Cain, Carson, and Trump’s rivals distanced themselves from those views. But with the honorable exception of Lindsey Graham, no rival said the comments were disqualifying. As far as I’m aware, no rival except Graham even demanded an apology. As for ordinary GOP voters, they largely voiced their assent. A March Rasmussen poll found that 71 percent of likely Republican voters (as opposed to only 34 percent of their Democratic counterparts) back Trump’s Muslim ban. A Public Policy Polling survey from last fall found that a majority of likely Republican primary voters in Iowa either favored criminalizing Islam or weren’t sure. When asked last November by The Economist and YouGov whether they agreed with Trump’s statement that, “When Mexico sends its people, they’re not sending their best. They’re sending people that have lots of problems. They’re bringing drugs. They’re bringing crime. They’re rapists,” 63 percent of Republicans (compared with only 23 percent of Democrats) said they agreed.

It was not inevitable that anti-bigotry would become a partisan dividing line. In 1964, a majority of both House Democrats and House Republicans voted for the Civil Rights Act. (Republicans by a slightly higher margin.) In the mid-1990s, leading Democrats and Republicans both opposed gay marriage. In 2000, George W. Bush spoke out against the fact that Arab Americans were being “racially profiled.” As recently as 2008, neither John McCain nor Barack Obama demonized Mexican immigrants.

What’s changed? The divergence began when Democratic presidents signed civil-rights legislation in the 1960s and Republicans responded by taking the white South. As a result, African Americans became a key Democratic voting bloc while the GOP remained overwhelmingly white. There’s some evidence that, in the years prior to Obama’s election, this racial polarization was easing, with younger African Americans showing less loyalty to the Democratic Party and Bill Clinton winning a significant chunk of the white South. But as UCLA political scientists Michael Tesler and David O. Sears have documented, Obama’s election supercharged the party’s racial identities. Since 2004, Americans who exhibit higher levels of “racial resentment” have moved toward the GOP and those who exhibit lower levels have moved toward the Democrats.

This heightened partisan polarization around race has served as a template for the way the two parties respond to Muslims and Mexican Americans. Just as Democrats are more likely than Republicans to consider anti-black racism a problem, they’re also more likely to worry about bigotry against Muslims. Republicans, by contrast, are more likely to dismiss the grievances of both groups as “political correctness.”

The Obama polarization has also shaped the way the parties have responded to Latino immigration. Since the 1990s, political scientists have observed that hostility to African Americans correlates with hostility toward immigrants. And as Mexican immigration has become a bigger political issue, views of Latino immigrants have divided the two parties in the roughly the same way that views of African Americans do. The Democratic Party, which once had a robust anti-immigration wing, is now so dependent on Latino votes that Hillary Clinton in March pledged to halt virtually all deportations of undocumented immigrants. Trump, by contrast, has called Mexican immigrants “rapists,” thus transposing hoary white fears of black sexual violence onto Latinos.

Never before in modern American history have the political parties been as polarized along racial lines as they are right now. The presumptive Democratic presidential nominee responded to Black Lives Matter protesters by changing her platform to accommodate them. The presumptive Republican nominee responded to Black Lives Matter protesters by congratulating his supporters for assaulting them. This level of polarization may be dangerous for the country. But it means that, as Trump leaves the GOP cocoon and begins foraging for Democratic votes, he will face a dramatically more hostile environment. Obama helped create today’s Republican Party, a party open to Trump’s bigoted appeals. But Obama has also helped create today’s Democratic Party, a party more deeply anti-racist than any in American history.

Today’s Democratic Party is built on mobilizing African Americans, Latinos, and those white Americans who identify with their political views. It’s built on leveraging voters who consider bigotry a powerful, living force in American life. It’s a flawed party in many ways. But, thankfully, it’s a party built to defeat Donald Trump.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.