What emboldened white nationalists to brazenly march through a sleepy college town and then violently assault counterprotesters? That’s the question lingering in the minds of Americans two weeks after Charlottesville.

Although many forces came into play to produce these heartbreaking events, a crisis of white identity drove them. More than a half-century ago, minorities, women and immigrants began to challenge the economic, political and legal hierarchy that had favored white men for centuries. Their efforts produced a white backlash that burst into the open after Barack Obama’s election in 2008.

Donald Trump has tapped into this anger and manipulated it to his political advantage. The bond between President Trump and his white followers is not based on policy but on grievance. They both reject the cultural changes over the past half-century, and Trump’s Make America Great Again slogan signals his intent to unravel them. Last week in Phoenix, he extolled his overwhelmingly white audience as “honest, hard-working taxpaying … Americans who love our nation, obey our laws and care for our people.” He warned that the hated media was trying to “take away our history and our heritage,” fanning the flames of white discontent.

The past five decades have not been kind to the white, heterosexual men who made up the overwhelming majority of those who invaded Charlottesville and who support the white nationalist movement. Until the 1960s, white men sat unchallenged atop the United States’ cultural and economic pyramid. They did not have to compete against women or African Americans in the workplace, and they benefited from laws and customs that sustained their privileged position. They not only ruled the workplace, they dominated American politics and exercised virtually unchallenged power at home.

At the same time, a combination of unprecedented prosperity and a muscular labor movement provided well-paying jobs in large manufacturing plants with generous benefits. (There were, of course, many whites who lacked meaningful employment and battled poverty, but compared to other groups, white men clearly enjoyed advantages.)

And then their world exploded. African Americans, unwilling to accept the legacy of Jim Crow, confronted the white power structure in the South. With the help of liberal allies, they pushed Congress to pass two major pieces of civil rights legislation that outlawed legal discrimination. Feminists, inspired by these successes, challenged laws that confined them to traditional roles in the private sphere. They smashed the notion that women could not be lawyers, doctors and corporate leaders, and they made clear they were not content to be subservient housewives. They were later joined by the LGBT community that demanded equal treatment while questioning traditional conceptions of gender and sexuality.

One person was killed and 19 were injured amid protests of a white nationalist rally in Charlottesville on Aug. 12. Here’s how the city became the scene of violence. (Elyse Samuels, Zoeann Murphy/The Washington Post)

But by far the greatest threat to white male dominance has been immigration. The Immigration Act of 1965, which made “family unification” the centerpiece of the nation’s immigration policy, produced a dramatic increase in the number of people coming to the United States. According to the Pew Research Center, immigrants and their children born in the United States account for 55 percent of population growth since 1965. Immigrants made up 5 percent of the population in 1965; they make up 14 percent today.

This legislation also fundamentally altered immigration patterns. After 1965, the vast majority of new immigrants came from Asia, Africa and Latin America. Many whites view these immigrants as a threat to America’s “common culture” — a culture that white men created. From their perspective, instead of assimilating into the American culture, recent migrants have given rise to a new identity politics that celebrates cultural differences and rejects shared values.

Beginning in the 1960s, many white men perceived the changes wrought by the rights movements and increased immigration not as building a fairer, more diverse society and rectifying past wrongs, but as a direct assault on them and their values. In response, they mobilized in opposition to policies designed to promote diversity, from busing and affirmative action to bilingual education and gay rights. Grievance defined their targets. They fumed about companies and schools giving preference to less-qualified minorities in an effort to achieve greater diversity. And they’ve battled against liberal academics who want to erase them from the history books by stressing multiculturalism and celebrating the contribution of minorities while distorting and minimizing the achievements of white men.

Economic changes since the 1970s have compounded these concerns. The decline of manufacturing and the influence of labor unions meant that many working-class men have found their traditional pathway to a better life blocked. Over the past two decades, the information sector has made robots, not immigrants, a serious threat to factory workers — a distinction missed by Trump’s scapegoating of cheap labor in Mexico and “terrible” trade deals.

Education has always been a way for social and economic advancement in the United States, but that door is closing to all except the wealthy. In 1974, the average annual tuition at a four-year private college stood at a reasonable $2,000, which adjusted for inflation would equal a little over $10,000 in 2017. Today, however, tuition at a private university is roughly $31,000. Costs have similarly risen at public universities.

And then there is the festering issue of income inequality that threatens the very foundation of the American Dream. Between 1993 and 2016, incomes of the wealthiest 1 percent grew 94.5 percent, while the bottom 90 percent increased by only 14.3 percent. In 1965, a typical CEO’s salary was roughly 20 times that of a typical worker. By 2011, CEOs earned 383 times more than the average worker.

The key here is perceived disadvantage. These economic changes have affected virtually every demographic group in this country. In fact, other groups have suffered far greater real hardship than white men. But over the past few decades, white men have experienced the greatest psychological blow. They worked hard to realize the American Dream, only to be told that their success was the result of “white privilege.” They never felt privileged.

Even worse, they have confronted a shifting partisan landscape. While white workers were celebrated as the base of the New Deal coalition, since the 1970s, the modern Democratic Party has shifted its focus to identity politics and embraced the movements so loathed by white men. From their point of view, liberals have abandoned them, more interested in celebrating diversity and combating the economic struggles confronting minorities than in responding to their economic plight and protecting American values. Although they receive many benefits from government, they don’t see it that way. In their mind, their wages are declining and their jobs are disappearing, and yet Democrats want to take ever increasing amounts of their hard-earned money to support less deserving minorities.

White men believed the American culture they shaped and institutions they ran were fair and sound and drove our triumphs. They saw little reason to change a society that had served them so well. But now they find their value system under assault from all directions. They aren’t even sure what they can say without being branded racist or sexist, thanks to the reviled culture of political correctness. Many have responded to these challenges by embracing a toxic brew of resentment and victimization.

What unites the white working class, the sociologist Michael Kimmel has observed, is a sense of “aggrieved entitlement.” Polls show that more than any other demographic group, non-college educated whites feel abandoned by the government, fearful that their children’s lives will be worse than their own, resentful of immigrants and convinced that the nation’s growing racial and ethnic diversity will push them to the margins of society.

As the nation witnessed in Charlottesville, a handful of these angry white men have joined fringe movements that openly advocate violence and preach white supremacy. But they are a small minority. Millions more white men, however, feel the same anger, but refuse to be associated with extremist groups and retain some hope that the traditional parties — and the mainstream media — will acknowledge their grievances.

So how should the nation respond to their pleas?

We must unequivocally condemn the hate-filled rhetoric and violent tactics of neo-Nazis and white supremacist groups. There can be no compromise or efforts to appease these groups. They must be crushed.

But we also need to address the underlying conditions that fuel white male resentment. That means having a balanced discussion about immigration that appreciates the many contribution that immigrants make to our nation while establishing clear, fair-minded limits on how many people can enter the United States. It means dramatically increased federal spending on infrastructure and on education to provide meaningful jobs now and the hope of better jobs in the future. It means rethinking government policy that contributes to income inequality. It also requires having difficult conversations with white men about their misperceptions about themselves.

There is a warning here for both parties. Democrats need to expand their concept of diversity to include white men and they need to stop dismissing them as racists. They should listen to the stories of people in economically decimated rural areas in Iowa and Wisconsin as well as traditionally Democratic cities like Philadelphia and San Francisco. At the same time, Republicans under Trump have become the party of cultural nostalgia. But all they offer are false promises and phony solutions that will do little to alleviate the underlying sources of white discontent. They need to take seriously the real challenges facing downwardly mobile whites and not just manipulate their fears to win election.

Until our political system finds a way to make angry white men less angry, our society will face more turmoil and violence.