A man fatally stabbed two passengers aboard a Portland, Ore., commuter train after they tried to stop him from harassing two young women who appeared to be Muslim, police said on Saturday.

Police have arrested Jeremy Joseph Christian of Portland, a 35-year-old convicted felon. He was taken into custody soon after the attack.

The attack unfolded hours before the start of Ramadan, Islam's holy month, when most of the world's 1.6 billion Muslims observe a daily religious fast.

A man started shouting ethnic and religious slurs, apparently at the two young women, one of whom wore a hijab, the Portland Police Department said in a statement.

A sign of thanks rests against a traffic light pole at a memorial outside the transit centre in Portland, Ore. (Gillian Flaccus/Associated Press)

Police said 53-year-old Ricky John Best of Happy Valley, Ore., died at the scene on Friday and 23-year-old Taliesin

Myrddin Namkai Meche of Portland died at a hospital.

Police say 21-year-old Micah David-Cole Fletcher of Portland was also stabbed in the attack and is in serious condition at a Portland hospital. Police say his injuries are not believed to be life-threatening.

Christian was booked on two counts of aggravated murder and charges of attempted murder, intimidation and being a felon in possession of a restricted weapon, and was ordered held without bail.

'He was saying that Muslims should die'

The women left the train before officers arrived, police said.

Dyjuana Hudson, the mother of one of them, told The Oregonian newspaper her 16-year-old daughter, who is black, boarded the train with a Muslim friend, also a teenager, who was wearing a hijab.

The attacker approached the girls while screaming at them, Hudson told the newspaper, relaying an account her daughter had given her. "He was saying that Muslims should die," Hudson said.

On Friday police said detectives wanted to speak to the two women. A detective later took a statement from her family, Hudson told the paper. She could not be reached for comment.

The stabbing was reported around 4:30 p.m. Friday as the MAX commuter train pulled into the Hollywood Transit Centre station in northeast Portland. (Bay Area Transit News/YouTube)

Police declined to release details of Christian's criminal history. But the newspaper reported he had been convicted of robbery, kidnapping and weapon charges, citing court records. It was not immediately clear if he had obtained an attorney.

In a statement, the Council on American-Islamic Relations blamed an increase in anti-Muslim incidents in part on U.S. President Donald Trump's focus on militant Islamist groups and anti-immigrant rhetoric.

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

A senior researcher with the Southern Poverty Law Centre, in a blog post, said Christian's Facebook page showed he held "some racist and other extremist beliefs."

A Facebook page that appears to belong to Christian mentions "Jihadi Muslims" among people he disliked.

"If Donald Trump is the Next Hitler then I am joining his SS to put an end to Monotheist Question," a rambling post on Jan. 23 reads.

The page includes images of Christian raising his right hand in a Nazi-like salute at a "Free Speech" protest in Portland last month.