A woman who was killed moments before a knife-wielding man went on a rampage in downtown Sydney on Tuesday while yelling "Allahu akbar" has been identified as a 24-year-old sex worker who reportedly had seen the suspect at least once.

Michaela Dunn, 24, was discovered dead inside an apartment after a 21-year-old man was confronted by a group of civilians, who pinned him to the ground with a milk crate until authorities were able to arrest him.

New South Wales Police said the slain woman had sustained a "laceration to her neck" and was pronounced dead at the scene about 3 p.m. on Tuesday. Police said that an initial investigation found the man had "attended the unit for an appointment" around 1:30 p.m. before he was seen on CCTV leaving the building by 1:50 p.m.

By 2 p.m., authorities were responding to reports of a man with a 12-inch knife attempting to stab multiple people near a busy intersection in Australia's largest city.

SYDNEY STABBING SUSPECT YELLING 'ALLAHU AKBAR' PINNED TO GROUND BY BYSTANDERS WITH MILK CRATE

A sex worker industry advocate told the Australian Broadcasting Corporation that she understood the suspect had seen sex workers, including Dunn, on multiple occasions in the past. Police told the ABC they believe the suspect had visited Dunn previously for sexual services.

"It's not something that was at all expected or planned, from what I understand," Scarlet Alliance Australian Sex Workers Association chief executive Jules Kim told the ABC.

A joint statement by the Scarlet Alliance said that Dunn was a "whole individual who will be missed and mourned."

"There is significant stigma and discrimination experienced by sex workers and too often our identities, lives and experiences are reduced to our occupation," the group said on Facebook. "Sex industry workers are worthy of the same rights and protections as those working in other professions. They are equally deserving of empathy and consideration when befallen by tragedy."

AUSTRALIA, NEW ZEALAND SEIZE ENORMOUS HAUL OF MDMA, METH, WORTH $60M

Dunn's mother told Australia's 9News her daughter was a "beautiful, loving woman" who "traveled widely."

Another friend, Joan Westenberg, wrote on Twitter she was "incredible."

During the rampage, witnesses said the man was attempting to attack people while yelling "Allahu akbar" –"God is the greatest" in Arabic – before he was restrained by bystanders. Video taken by witnesses also showed him shouting the phrase.

New South Wales Police Commissioner Michael Fuller said authorities have not labeled the stabbing rampage as an act of terrorism, but the 21-year-old suspect with a history of mental illness had collected information online about mass killings in North America and New Zealand.

"He is, by definition, at the moment, a lone actor. Information was found on him that would suggest he has some ideologies in relation to terrorism, but he has no links to terrorism," Fuller told reporters. "There was certainly information found on him about other crimes of mass casualties and mass deaths around the world."

CLICK HERE FOR THE FOX NEWS APP

Video showed the man running through an intersection, jumping on a car while waving a knife before a group of men pinned the suspect to the pavement on his back with a plastic milk crate over his head and two chairs over his body.

New South Wales Police Superintendent Gavin Wood said it appeared that the attack was unprovoked. The man "attempted to stab multiple people. Those attempts, thankfully, were unsuccessful."

The Associated Press contributed to this report.