Two men were stabbed to death in Portland on Friday when they tried to stop their attacker from harassing two women because they appeared to be Muslim, police said.

The incident unfolded on a commuter train hours before the start of Ramadan, Islam’s holy month, when most of the world’s 1.6 billion Muslims observe a religious fast.

The attack began shortly before 4:30 p.m. when a man started yelling ethnic and religious slurs toward two women who appeared to be Muslim on a MAX train at the Hollywood Transit Station, the Portland Police Department said in a statement.

Three men who intervened were stabbed, two fatally. The attacker was arrested shortly after he got off the train, police said, adding that the women left the scene before police could interview them.

“In the midst of his ranting and raving, some people approached him and appeared to try to intervene with his behavior and some of the people that he was yelling at,” Portland police spokesman Pete Simpson said during a news conference aired by local news outlets.

“They were attacked viciously by the suspect,” he added.

In a statement responding to Friday’s attack, the Council on American-Islamic Relations said that anti-Muslim incidents increased by more than 50 percent in the United States from 2015 to 2016 due in part to President Donald Trump’s focus on militant Islamist groups and anti-immigrant rhetoric.

“President Trump must speak out personally against the rising tide of Islamophobia and other forms of bigotry and racism in our nation that he has provoked through his numerous statements, policies and appointments that have negatively impacted minority communities,” said CAIR National Executive Director Nihad Awad.

The administration says that while it strongly opposes Islamist militants, it has no quarrel with Islam.

Following the attack, police said one of the men died at the scene while another died at a hospital. The third man was treated for non-life threatening injuries.

“These were folks just riding the train and unfortunately got caught up in this,” he said.

Witnesses told police that the two young women were possibly Muslim. One wore a hijab.

Portland police did not identify the suspect or the victims.