Racial abuse from a couple at Wollongong station led a man to pull a knife on them, Wollongong Bail Court heard on Sunday.
Woonona man Meshack Nindagiye, 23, appeared in bail court charged with affray and wielding a knife in public.
The police facts allege Nindagiye was with his partner (who is white) and sister on the western platform at Wollongong station on Saturday just after 6pm.
The alleged victim and his partner were directly opposite them on the eastern side.
According to Nindagiye's solicitor, the man allegedly started a stream of racial abuse, calling his sister a "black bitch" and his partner a "white bitch".
The police facts allege the two parties walked up to the footbridge, where they confronted each other.
The alleged victim had his dog with him and took it off the lead, the partner holding it by the collar.
He then began swinging the dog lead.
Police allege Nindagiye then pulled a knife from a sheath in the waistband of his pants and walked towards the alleged victim, who left the scene.
The police statement does not mention whether anyone suffered any injuries in the incident.
Soon afterwards, Nindagiye returned to the station and caught a train to Woonona, where police arrested him at 10.30pm.
In bail court his solicitor noted Nindagiye had come from Tanzania in 2006, where he experienced trauma.
She also said he had recently suffered a serious assault with a machete and axe, which left him with a wound to the side of the head.
The defence solicitor claimed the knife belonged to Nindagiye's partner, and he had taken it off her with no intent to use it.
In opposing bail the police prosecutor noted Nindagiye was currently on bail and, if found guilty, a jail sentence was "almost inevitable".
The registrar refused to grant bail to Nindagiye, noting "he has quite a lengthy criminal history and of significant violence for such a young person".
Nindagiye will appear at Wollongong Local Court on Monday.