A man accused of killing two other men during an anti-Muslim rant against two girls on board a train in the US city of Portland appeared in court shouting slogans and defending his act as "patriotism".

Jeremy Christian, 35, is charged with murder, attempted murder, possession of a weapon and hate crime after he stabbed the two men who tried stopping him from shouting slurs at a pair of teenage girls on Friday.

One of the girls was wearing a headscarf and is believed to be Muslim.

Christian entered the court on Tuesday shouting about free speech. 

Portland in shock and grief after 'hateful' stabbings

"Free speech or die Portland. You've got no safe place. This is America. Get out if you don't like free speech," he shouted in the court.

"You call it terrorism; I call it patriotism. You hear me? Die. Death to the enemies of America. Leave this country if you hate our freedom," he added.

Police say Christian has extensive associations with white supremacist and anti-immigrant hate groups.

Christian is reported to have shouted Islamophobic slurs at the girls, as well as other hate speech.

Many hailed the two victims - Rick Best and Taliesin Namkai Meche - as heroes and promoted crowdfunding pages to support their grieving families. 

A third victim, 21-year-old Micah David-Cole Fletcher, who was also stabbed in the attack but survived, attended the court hearing.

People also gathered at the transit station near where the men were killed to show support.

"What you have here in Portland is a fairly self-congratulatory progressive core. Outside that core is a lot of hate. Now, the forces of hate seemed to be emboldened," James Krane, a protester, told Al Jazeera.

READ MORE: Portland victims of white supremacist killer identified

US President Donald Trump's harsh anti-Muslim rhetoric and anti-immigrant policies have energised hate groups and individuals harbouring rage, critics say.

In recent months, there have been a series of attacks - some fatal - on non-white immigrants in several US states.

A US civil rights group report documented nearly 900 such incidents in the ten days following Trump's election as president last November.

"There's no question there is some connection between the so-called Trump ideology emanating from the White House and the kind of permission-giving that leads, through social media, to these kind of events," Steven Wasserstrom, a faculty of Reed College, told Al Jazeera.

Trump, meanwhile, condemned the killings of the two men, calling them "unacceptable".

Christian's next court appearance is on June 7. If found guilty, he could either face life imprisonment or the death penalty.

Source: Al Jazeera and news agencies

US & Canada, United States, Religion