PORTLAND, Ore. — The fatal stabbing of two good Samaritans who intervened when a man on a commuter train shouted slurs at two women — both African-American, one in Muslim dress — has reawakened bitter memories of this state’s past and revived a debate over what people here call the “two Oregons,” where islands of tolerance abut places awash in frustration and rage.

“Oregon hasn’t resolved its history,” said Dani Ledezma, the interim executive director of the Coalition of Communities of Color, a group based in Portland. And the harsh language and tone of national politics, she said, are now exacerbating old wounds. “The xenophobia, the racism, the caustic narrative that has been fomented at the national level are also having an impact here and adding to that legacy here in Oregon,” she said.

The Pacific Northwest’s historical attic is full of artifacts that residents would just as soon forget, like the “lash law.” The legislation was passed in 1844, when the Oregon Country, as it was called then, was bigger than Texas — encompassing land that is now part of five Western states. The law said that any black person, free or slave, would be “whipped twice a year until he or she shall quit the territory.” Later, leaders went even further, prohibiting black people from coming to the territory at all.

That racism lingered and festered. Until the early 2000s, Oregon’s constitution still contained language excluding blacks from residency, though its legal clout had been eliminated decades earlier. The template from the early days helped foster a volatile political climate in which extremists of all kinds could find a home, and pick a fight. Along with racists, utopian communities were drawn to the region, advocating everything from socialism to free love, and they found converts and hiding places in remote coastal coves and mountain reaches. In the 1920s, Oregon’s Legislature, dominated by members of the Ku Klux Klan, barred Japanese immigrants from owning or leasing land.

By the 1970s, groups like the Aryan Nations had arrived, spinning out the idea of a mythic Cascadia where the old flames of racial purity would be kept alive and multiculturalism kept at bay. Anarchists dug in, too, and still have a deep presence, regularly turning out — black-shirted and usually masked — to denounce and often clash with the police.

While many Americans think first of the South as the place where the burden of racial strife weighs heaviest on the nation’s soul and psyche, the recent events in Portland serve as a reminder that old battlefields are everywhere.

“The lid is off,” said Detective Elizabeth Wareing, the bias crimes coordinator at the Seattle Police Department. She added that alcohol, drugs and mental illness often played a role in the interactions she investigates.

But she and other experts said that at the same time, there is less and less evidence that any extremist group — old or new — is shaping the messages that are being expressed. Free-form self-radicalization, picking this or that from the heaping smorgasbord of hate on the nation’s plate, is becoming the norm.

The suspect in the train attack, Jeremy Joseph Christian, 35, fits no obvious mold in the white-supremacist world. Last year, for example, Mr. Christian ardently supported Senator Bernie Sanders of Vermont, a socialist-leaning Democrat, in the presidential primaries, according to his Facebook posts, before turning to support then-President-elect Trump in December. On the train and after his arrest, according to a police affidavit, Mr. Christian raged against immigrants, Saudi Arabia and liberals, and he called himself a defender of free speech who could “die in prison a happy man.”

“He was all over the map,” said Randy Blazak, the chairman of the Oregon Coalition Against Hate Crime, a partnership of community groups and government. “There isn’t really a flow chart that fits how people like Jeremy Christian come about,” said Mr. Blazak, who is also a professor of criminology at the University of Oregon.

Other people said that in a moment in which many immigrants and Muslims feel uneasy, here and across the nation, and racial slurs spew across social media, the attack on the train had put a broader discussion of race in the Pacific Northwest back on the agenda. Of the nation’s 30 largest cities, Portland remains the whitest, according to the Census Bureau, with 72.2 percent of its population classified as non-Hispanic white. Seattle is not far behind, at 66.3 percent white.

“It’s economic, it’s criminal justice, it’s segregation,” said Ms. Ledezma, of the Coalition of Communities of Color, describing the legacy of racism in Oregon. “If you look at the housing patterns, there is this lasting legacy of disparity that’s been essentially baked in.”

Law enforcement agencies have begun looking at the ways that hidden racial attitudes can spill out. Police officers in Seattle, for example, track encounters that on the surface do not appear to be about race or religion at all, such as traffic accidents that grow to include “bias elements” as tempers flare. The number of these events, police figures show, is up. Instances of hateful graffiti are on the rise, too. Portland residents reported more bias-fueled vandalism in the three months after the presidential election than in any other November-to-February period in at least five years, according to figures compiled by the city.

The short explanation, said many people in law enforcement and civil rights groups who track hate crimes, is a collapse of inhibition. More open hate speech in politics, street demonstrations and social media, they said, loosens the floodgates for people exposed to it, diminishing the sense of impropriety or social taboo.

“The nature of radicalization is changing,” said Oren Segal, the director of the Center on Extremism at the Anti-Defamation League, a national civil rights group. “People are borrowing, picking and choosing elements of various extremist ideologies and tactics and movements or what have you, and creating their own sort of worldview,” Mr. Segal said.

International terrorist groups also use social media and other digital tools to influence and recruit followers, but the stark difference with what some scholars have called “postmodern hate,” is that there is no unifying philosophy to draw from. That makes it harder for law enforcement agencies to monitor potential threats and to identify the sort of lone-wolf attacker that Mr. Christian appears to have been.

Disorganized hate presents deep new challenges, especially in an environment in which the willingness to make threats, if not act on them, is also apparently increasing. Last week, a Princeton University professor who had publicly criticized Mr. Trump canceled an appearance in Seattle, citing death threats as the reason.

“Today’s hate is splintered,” said Brian H. Levin, a professor of criminal justice and the director of the Center for the Study of Hate and Extremism at California State University, San Bernardino. “People are dipping in the ladle and scooping out what they want,” he added. The geography has shifted, too, he said. The rise of the alt-right — the racist fringe movement with online roots — has destabilized the old extremist groups that once flourished in the Pacific Northwest by disavowing the idea that geography matters at all.

“Their message has been, ‘Why do we have to settle for one region?’” Professor Levin said.