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 what 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 prohibited black people from coming to the territory.

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.