Bruce McArthur was likely moments away from murdering a ninth man from Toronto's gay community when police moved in to arrest the serial killer.

A sentencing hearing for the 67-year-old revealed officers who stormed his apartment found a man lying bound to McArthur's bed. When police searched McArthur's computer, they found folders with images of his eight previous victims and a ninth folder with chilling implications for the man they rescued.

"The ninth subfolder was entitled 'John' and appears to have contained photographs of the man who was found handcuffed to Mr. McArthur's bed," said prosecutor Michael Cantlon, reading from an agreed statement of facts. "A photograph of John on Mr. McArthur's bed was located on Mr. McArthur's computer."

Cantlon said McArthur -- who pleaded guilty last week to eight counts of first-degree murder -- had established a clear victim profile over the years.

The men he killed between 2010 and 2017 all had ties to the city's gay community and shared social traits that put them at greater risk of harm, Cantlon said. Many of the victims, for instance, had to hide their sexuality from family members or contend with unstable housing situations, he said.

"There is evidence that Mr. McArthur sought out and exploited these vulnerabilities to continue his crimes undetected," Cantlon said.

McArthur also largely targeted men of Middle-Eastern descent with similar physical appearances, he added.

The man later identified as John fit the profile in nearly every way, court heard.

Cantlon said McArthur had met John through an online dating app in the summer of 2017, roughly five years after the man had immigrated to Canada from an unspecified Middle-Eastern country. John is currently married and has kept his sexual orientation a secret from family and friends, he added.

Cantlon said McArthur and John had several sexual encounters during the months of their acquaintance.

A similar encounter seemed set to get under way on Jan. 18, 2018 when John came to McArthur's central Toronto apartment, court heard.

On that occasion, McArthur asked John if anyone knew of their planned meeting. John replied that their rendezvous was a secret.

When they reached the bedroom, McArthur told John they would have to hurry because someone was expected at the apartment, the prosecutor said.

Once John had undressed, McArthur announced he wanted to "try something different" and bound the man to the bed with handcuffs. That same bed, court heard, was where several of McArthur's other victims were killed.

"Mr. McArthur then retrieved a black bag from another room, took a black leather bag and placed it over John's head. There were no holes in the bag," Cantlon said.

"John asked Mr. McArthur to remove the bag, but Mr. McArthur did not remove it. When John was able to get the bag off of his head, Mr. McArthur attempted to tape John's mouth shut."

By this time, McArthur was very much on the police radar after officers has linked his car to the 2017 disappearance of Andrew Kinsman, later revealed as the eighth murder victim, court heard. Days before, investigators had even surreptitiously searched McArthur's apartment for evidence.

Cantlon said police observing McArthur saw him bring John up to his apartment and decided to move quickly given the "exigent circumstances."

They knocked on McArthur's apartment door and arrested him while John lay in the bedroom. They later uncovered the folder bearing John's name and containing his photos alongside other folders filled with evidence of McArthur's previous killings.

Those folders were labelled with nicknames or other identifiers matched to Skandaraj Navaratnam, Abdulbasir Faizi, Majeed Kayhan, Soroush Mahmudi, Kirushna Kanagaratnam, Dean Lisowick, Selim Esen and Kinsman.

Pictures recovered from those folders depict the men posed with cigars in their mouths and wearing fur coats and hats after their deaths.

The statement of facts also revealed details of another close call for a man who reported that McArthur had violently choked him inside his van in June 2016.

The man, who said he had known McArthur for years, told police he was asked to lie down on a fur coat at the back of the vehicle. McArthur then went on to choke him with "a look of determination on his face," the statement read.

Court heard the man managed to escape, but was unable to swallow properly for a week. McArthur went to police on his own and gave a statement that prompted officers to release him.

McArthur's sentencing hearing is scheduled for three days this week.