Today, the Republican Party polarizes the American people. Some voters see the GOP as authentic defenders of conservative values, led by a bold and unconventional president who carries out the popular will. The opposition, by contrast, sees a party full of old, angry, out-of-touch white people without concern for the defining issues of our time — including racial justice, women’s rights, wealth inequality and climate change — who have hitched their wagon to a megalomaniacal charlatan.

The seeds of these divisions were planted in 1968 during a thunderstorm of chaos: the Tet Offensive in Vietnam and the Soviet invasion of Czechoslovakia, the assassinations of the Rev. Martin Luther King Jr. and Robert F. Kennedy, riots in black inner cities, vicious conflicts between police and protesters at the Democratic National Convention.

In a year of radical protest, racial upheaval and violent tragedies, it was the Republican candidate, Richard M. Nixon, who resonated with the comfortable yet nervous middle class that was spreading into suburbs and the South. As the party’s conservatives outmuscled its moderates, Nixon found the language to absorb an emerging populist resentment of liberalism without totally alienating moderates whose support he needed for victory. This election from 50 years ago helped craft the identity of today’s GOP, making possible the rise of Donald Trump and the divides that polarize us.

In 1968, Nelson Rockefeller was probably the most popular politician vying for the White House. The ambitious billionaire governor of New York blended socially conscious policies with values of fiscal integrity and individual dignity. “Rocky” came from a tradition of progressive Republicanism rooted in Abe Lincoln’s principles and Teddy Roosevelt’s pragmatism.

But to many Republicans, he was anathema. Four years earlier, he had decried his party’s nominee, Barry Goldwater, as a far-right extremist. That Goldwater campaign had amassed an army of grass-roots activists who resented big government, championed a demonstrative patriotism, decried race-conscious legislation and celebrated free enterprise. In their eyes, elite “kingmakers” such as Rockefeller betrayed the Republican rank and file.

Those same conservatives adored Ronald Reagan, who coated Goldwater’s conservatism in a goo of geniality. In 1966, Reagan captured the governor’s office in California by decrying a morality gap, an all-encompassing way to paint radical hippies, black rioters, welfare moochers and snooty eggheads as the spoiled brats of liberalism. In 1968, Reagan declared his candidacy at the Republican National Convention in Miami Beach, and right-wing delegates — especially in the South — considered him their true champion.

Nixon was the pragmatic choice, however, acceptable to all wings of the party. “We have no choice, if we want to win, except to vote for Nixon,” lectured the arch-conservative Strom Thurmond. The influential senator from South Carolina reassured his fellow Southern delegates. “I love Reagan, but Nixon’s the one.” Nixon had been courting Thurmond with reassurances of conservative positions: “strict constructionists” on the Supreme Court, strong national defense and slow integration of Southern schools. Their alliance foretold the South’s transition to the Republicans, hardening the party’s conservative identity.

Nixon’s acceptance speech at the RNC celebrated “the great majority of Americans, the forgotten Americans, the nonshouters, the non-demonstrators.” They were factory workers, business executives, soldiers. “They’re not racist or sick, they’re not guilty of the crime that plagues the land,” he declared. “They are good people; they are decent people. They work hard and they save and they pay their taxes and they care.”

Nixon kept himself in the party’s center by shifting rightward. During the general election, he hammered on the theme of “law and order,” demanding strict responses to the forces of social chaos: poor blacks burning down ghettos, radicals plotting revolution, filthy hippies lacking basic values, thieves and rapists ruling the city streets. He blasted the liberal Attorney General Ramsey Clark as a coddler of criminals. He associated himself with social morality through frequent appearances with Baptist evangelist Billy Graham.

His vice-presidential pick, Maryland Gov. Spiro Agnew, delivered blustery, impromptu speeches that took potshots at “pseudo-intellectuals” and the “effete corps of impudent snobs” in the national media, while blasting student radicals as “spoiled brats who never had a good spanking.” If Agnew lacked judgment and restraint, so what? He had simple values: hard work, patriotism, discipline. He was wrestling in the dirt for votes with George Wallace.

Though never a Republican himself, Wallace was the final key personality in the Republican Party’s transformation. In 1968, the former and future Democratic governor from Alabama campaigned under the banner of the American Independent Party. Wallace highlighted how populist resentment was feeding U.S. conservatism. In his jangly, violence-spattered, grass-roots tours across the South and through the northern industrial belt, he whetted racist fears and liberal resentment while celebrating a romantic vision of blue-collar whites as the upholders of American democracy.

Wallace’s admirers were typically lower-middle class, with steady jobs and home mortgages, but felt like victims of high taxes, rising inflation, racial integration and unpatriotic leftists. They testified that Wallace was the strong, forthright man to return America to greatness. “We will see Wallace elected because he will bring tranquility,” said one woman in Lake County, Ind. “He will put everyone in their place — the colored, the students, the people on welfare, anyone who is causing so much trouble.”

Nixon never attacked Wallace. In his effort to woo conservatives, he instead co-opted the third-party candidate’s tactics, positions and rhetoric — albeit with a veneer of respectable sobriety. And it worked. While Wallace won five Deep South states, Nixon won the border states and enough northern battleground states for a majority in the electoral college, triumphing over Democrat Hubert Humphrey.

The 1968 election foretold a Republican revival. With the growing suburbs, conservative South and white working class in its fold, Nixon capitalized on what strategist Kevin Phillips called “The Emerging Republican Majority.” The party had long stood for principles of limited government and staunch foreign policy. After 1968, it increasingly fused those ideas with issues that appealed to cultural conservatives: opposition to abortion, integrated busing, gun control, feminism, affirmative action, radical minorities and liberal elites.

These “gut-level” concerns energized the New Right coalition that elected Reagan in 1980 and initiated an era of Republican dominance in national politics. As conservative politicians increasingly adopted the language of populism, they found electoral success. They also fed the rage, resentment and racism that animated Trump’s base in 2016. The foundation was laid in 1968.