The 24-year-old Hamilton man who is accused of fatally stabbing his former girlfriend to death has made his first appearance in a Canadian courtroom.

Ager Hasan, wearing brown pants and a white shirt, spoke briefly with his lawyer and sat quietly as he waited out court delays caused by computer issues Monday morning.

Hasan has been charged with second-degree murder in the death of 22-year-old Melinda Vasilije.

Ager Hasan, accused in the death of Melinda Vasilije, is expected in court today. Reporter Kate Bueckert is there. <a href="https://t.co/5vPXqgKOLD">https://t.co/5vPXqgKOLD</a> —@CBCKW891

Crown attorney Brendan Thomas successfully applied to detain Hasan. Hasan was also ordered not to communicate with a list of more than 20 people.

The judge confirmed there is a publication ban on the court proceedings.

Two had been in a relationship

Hasan was arrested in San Antonio, Texas, on July 11, 2017 after he left Canada on April 28 — the same morning Vasilije was found dead in her Kitchener apartment.

​Two Waterloo Regional Police officers escorted Hasan back to Canada on Friday, police said.

Police were called to Vasilije's Country Hill Drive apartment at 3 a.m. on April 28, 2017, to find her dead. Police have said she died of multiple stab wounds.

That day, Hasan entered the U.S. around 6 a.m. at the Peace Bridge from Fort Erie, Ont., to Buffalo, N.Y.

Hasan is facing a second-degree murder charge and three counts of breach of recognizance.

His next court appearance will be Jan. 15.

While in the U.S., Hasan kept in contact with police investigators via email and social media. It's also believed he posted online to Reddit and Instagram.

Earlier this summer, he was arrested in San Antonio by the U.S. Secret Service at a traffic stop, as part of an ongoing counterfeit money investigation.

Police said Hasan and Vasilije had been in a relationship prior to her death.

Vasilije 'very sweet, very selfless'

Friends and family of Vasilije were in the courtroom and appeared to comfort each other when Hasan was brought into the courtroom. A woman who identified herself as Callie to reporters said she knew Vasilije through Vasilije's roommate.

"I met her a few times because we'd all hang out at the salon together," Callie said. "She was very sweet, very selfless, would do anything for anybody — she would do no harm."

She said she was in court because she wanted to see Hasan for herself.

Vasilije's roommate was not in court because it was just too hard and she may be called as a witness, Callie said.

"She's just completely heartbroken over it."