See more of the story

If you are a Democrat, would you marry a Republican? Would you be upset if your sister did?

Researchers have long asked such questions about race, and have found that along important dimensions, racial prejudice is decreasing. At the same time, party prejudice in the United States has jumped, infecting not only politics but also decisions about dating, marriage and hiring. By some measures, "partyism" now exceeds racial prejudice - which helps explain the intensity of some midterm election campaigns.

In 1960, 5 percent of Republicans and 4 percent of Democrats said that they would feel "displeased" if their son or daughter married outside their political party. By 2010, those numbers had reached 49 percent and 33 percent. Republicans have been found to like Democrats less than they like people on welfare or gays and lesbians. Democrats dislike Republicans more than they dislike big business.

Consider one of the most influential measures of prejudice: the implicit-association test, which is simple to take. You see words on the upper corners of a screen - for example, "white" paired with either "good" or "bad" in the upper left corner, and "black" paired with one of those same adjectives in the upper right. Then you see a picture or a word in the middle of the screen - for example, a white face, an African-American face, or the word "joy" or "terrible." Your task is to click on the upper corner that matches either the picture or the word in the middle.

Many white people quickly associate "joy" with the upper left corner when it says "white" and "good" - but have a harder time associating "joy" with the left corner when the words there are "black" and "good." So too, many white people quickly associate "terrible" with the left corner when it says "black" and "bad," but go a lot more slowly when the left corner says "white" and "bad."

To test for political prejudice, Shanto Iyengar and Sean Westwood, political scientists at Stanford University, conducted a large-scale implicit association test with 2,000 adults. They found people's political bias to be much larger than their racial bias. When Democrats see "joy," it's much easier for them to click on a corner that says "Democratic" and "good" than on one that says "Republican" and "good."

To find out whether such attitudes predict behavior, Iyengar and Westwood undertook a follow-up study. They asked more than 1,000 people to look at the resumes of several high-school seniors and say which ones should be awarded a scholarship. Some of these resumes contained racial cues ("president of the African American Student Association") while others had political ones ("president of the Young Republicans").

Race mattered. African-American participants preferred the African-American candidates 73 percent to 27 percent. Whites showed a modest preference for African-American candidates, as well, though by a significantly smaller margin. But partisanship made a much bigger difference. Both Democrats and Republicans selected their in-party candidate about 80 percent of the time.

Even when a candidate from the opposing party had better credentials, most people chose the candidate from their own party. With respect to race, in contrast, merit prevailed.

In a further test of political prejudice, Iyengar and Westwood asked 800 people to play the trust game, well known among behavioral scientists: Player 1 is given some money (say, $10) and told that she can give some, all or none of it to Player 2. Player 1 is then told that the researcher will triple the amount she allocates to Player 2 - and that Player 2 can give some of that back to Player 1. When Player 1 decides how much money to give Player 2, a central question is how well she trusts him to return an equivalent or greater amount.

Are people less willing to trust people of a different race or party affiliation? The researchers found that race didn't matter - but party did. People are significantly more trusting of others who share their party affiliation.

What accounts for the explosive growth of political prejudice? Modern campaigns deserve some of the blame. Iyengar and his colleagues show that when people are exposed to messages that attack members of the opposing party, their biases increase. But the destructive power of partyism is extending well beyond politics into people's behavior in daily life.

• Cass R. Sunstein, the former administrator of the White House Office of Information and Regulatory Affairs, is a professor at Harvard Law School and a Bloomberg View columnist.