A Sydney man was viciously assaulted in his own bedroom before fatally stabbing a visitor who was removing items from his dressing table, a judge has been told.
While the defence contends Rey Quintana was acting in self-defence, the Crown says the victim had his back to him when Quintana stabbed him once while angrily intending to cause him grievous bodily harm.
The defence also relies on "substantial impairment" due to his suffering from the mental illness of schizophrenia.
The 59-year-old has pleaded not guilty in the NSW Supreme Court to murdering Thomas Halatoa, 22, in his Tregear unit on the afternoon of February 28, 2018.
At his judge-alone trial trial, which began on Monday, prosecutor Donna Daleo said Mr Halatoa, another man and a woman had gone to the unit where they smoked ice in the lounge room.
At some stage, they went into the bedroom where the other man assaulted Quintana on his bed as Mr Halatoa started removing items from the dressing table.
The Crown alleges Quintana produced a knife and cut the arm of the other man who then left the unit.
The woman was expected to testify that Mr Halatoa was placing items in a bag when she saw Quintana with a knife in his hand, leading her to yell: "No way, no way."
Quintana approached Mr Halatoa from behind and stabbed him once in the back, Ms Daleo said.
He collapsed at a nearby unit before his two associates took him in a taxi to Mt Druitt hospital where he died.
Meanwhile, Quintana went to a neighbour's who noticed he had facial injuries and rang triple-zero.
He told police he had never met Mr Halatoa before, but the other man had previously assaulted him, which was reported to police.
Quintana said that after his property was being taken he thought: "I'm sick of this shit" and must have blacked out as he could not remember stabbing anyone.
He had thought "they are going to do the same wrong to me again", saying if he was in the Philippines and they did that they would be shot and he didn't want anyone touching him like that.
Ms Daleo said the Crown case was at the time of the stabbing Quintana was not acting in self-defence and Mr Halatoa was not presenting any threat to him.
He was angry at having previously been assaulted by the other man and at being robbed.
But Quintana's barrister Tony Evers said his client was woken up by three people in his apartment, including a man who had previously attacked him, and was "viciously assaulted".
The defence did not challenge the claim that Quintana stabbed Mr Halatoa, but the issue was whether the Crown could prove he was not acting in self-defence.
Significantly, he was being robbed by at least two, possibly three, people and viciously attacked during that robbery
His perception of events might also have been impaired by his mental illness, he said.
The trial continues before Justice Julia Lonergan.