TALIESIN MYRDDIN NAMKAI MECHE, 23, and Rick Best, 53, were killed when they — along with a third man , who was injured — intervened as two young women were being terrorized with anti-Muslim insults by a rider on a commuter train in Portland, Ore. They probably saved the women’s lives. They are heroes. Their willingness to help others — to stand up against bigotry and hate — hopefully will serve as an inspiration in these increasingly tense and troubled times.

“Without them, we probably would be dead right now,” said 16-year-old Destinee Mangum, who, almost in wonderment, added “they didn’t even know me.” Ms. Mangum, who said she is not Muslim, and a friend who was wearing a hijab were on the train late Friday afternoon when a man, later identified by authorities as Jeremy Joseph Christian, entered the car and started screaming slurs at them. Mr. Namkai Meche, a recent college graduate, and Mr. Best, an Army veteran and father of four, were fatally stabbed and Micah David-Cole Fletcher, 21, had his throat slashed as they tried to deescalate the situation.

Mr. Christian was arraigned Tuesday on aggravated murder and other charges. He has a criminal record, including a conviction in 2002 for robbery and kidnapping, and authorities said he has a history of white supremacist views. Did he just snap? Had he been spoiling for a fight? Did the rising tensions in Portland between groups with opposing and extremist views factor into this attack in any way? That hateful speech can lead to hateful actions should give pause to those who have been quick to divide and demonize.

President Trump’s unequivocal condemnation — “The violent attacks in Portland on Friday are unacceptable. The victims were standing up to hate and intolerance,” he tweeted Monday — was welcome and needed. Also encouraging was the public response: hundreds of people turning out for vigils and interfaith services and contributions pouring into GoFundMe campaigns for the three men as well as the young women.

Sadly, some may learn the wrong lessons from Portland’s tragic events, using them as reason not to say or do something when someone needs help. “Why be a hero?” goes that reasoning. People always should be careful about placing themselves in personal danger — and, if possible, summon help from authorities who may be better-equipped. In the end, though, the answer may lie with the insight offered by one speaker at a vigil honoring Mr. Namkai Meche and Mr. Best: “They didn’t have capes. They were just human beings that we all have the capacity to be.”