Detectives are working to piece together the movements of accused knifeman Mert Ney in the days leading up to his alleged stabbing attack in the Sydney CBD on Tuesday, which left one woman dead and another with serious injuries.

The 21-year-old, who has a history of mental illness and drug abuse, walked out of Blacktown Hospital last Thursday after reportedly being treated for an overdose.

His whereabouts between then and 2pm on Tuesday, when he emerged on the corner of Clarence and King streets wielding a 30 centimetre butcher’s knife and covered in blood, is likely to be a key focus of the investigation.

The Daily Telegraph reported Ney presented at Blacktown ­Hospital’s emergency department last Wednesday, August 7. He left the hospital through the ambulance doors at 6.15am the next morning, with police notified.

RELATED: Hero brothers followed ‘trail of blood’

RELATED: ‘We’re being traumatised’: Waleed on Sydney stabbing

Authorities were reportedly already looking for the man from Marayong, near Blacktown in Sydney’s west, in relation to an alleged domestic violence issue involving his sister.

It’s understood Ney, who lives with his mother on Percy Street, Marayong but has been homeless at times in recent years, appeared in front of a magistrate in Blacktown Local Court in June after being caught with knuckledusters.

According to the Telegraph report, the weapon possession charge was dismissed with no conviction recorded on the condition he not commit another offence in the next nine months and also seek mental health treatment.

Ney’s relationship, if any, with the woman he is accused of murdering in an apartment on Clarence Street is also a focus.

Homicide detectives are investigating the possibility he had a relationship with the sex worker, 21, after they met on classifieds website Locanto.

Police discovered the sex worker’s body, her throat slit, around 3.15pm in the unit inside Clarence House, a residential unit at 104 Clarence Street near Wynyard.

Ney’s second alleged victim, a 41-year-old woman sitting inside Hotel CBD, was stabbed once in the back. She was treated at the scene and taken to hospital, and is in a stable condition.

It was shortly after he allegedly stabbed the pub patron that a group of brave bystanders chased down the armed man and restrained him with chairs and a milk crate until authorities arrived.

Ney attended Blacktown Boys High School and Marayong Public School. A former peer from the latter told The Daily Telegraph he was a “weird” loner who kept to himself.

“He was the weirdest guy who never said a word, not one, his head was always down in a book and in the breaks he would stand alone, never speaking to anyone,” the former student said.

“He was a year above me but he stood out for being alone.”

Ney screamed “Allahu Akbar” and also had a USB on his person loaded with information about recent attacks carried out by white supremacists including the New Zealand massacre, but police say he was a “lone actor” and has no known links to any terror organisations.

Formal charges are expected to be laid against Ney at his bedside at Royal Prince Alfred Hospital on Wednesday after he has been questioned by police.

If you or anyone you know needs help, contact Lifeline on 13 11 14 or Beyondblue on 1300 224 636