The man accused of fatally stabbing two people on a train in the US during an anti-Muslim rant was defiant during his brief initial court appearance on Tuesday, shouting: "You call it terrorism, I call it patriotism!"

Jeremy Joseph Christian, 35, made repeated outbursts saying "you've got no safe place!" and "death to the enemies of America!"

"Leave this country if you hate our freedom - death to antifa," he said, using a common abbreviation for the anti-fascist movement.

Christian, who faces aggravated murder and other charges, didn't enter a plea. He has been appointed public defenders. In a statement, Lane Borg, the head of the local public defender agency, said the office was "saddened by this tragedy" but urged people to let the justice system take its course.

In court documents, prosecutors say Christian confessed while in the back seat of a police car after his arrest. His court-appointed attorney, Gregory Scholl, did not immediately return a call for comment.