On Friday, Judge Orlando Marrazzo ordered Kevin McGlynn to stay away from Rihanna's Manhattan apartment after he was caught "lurking" around the Tribeca building.

The 43-year-old homeless man was allegedly caught on video surveillance on three separate occasions this month hand delivering threatening notes to a Rihanna employee, according to court records.

In the letters, McGlynn “repeatedly called [Rihanna] a bitch,” and threatened to “bum (rush) in her apartment,” according to the criminal complaint. Authorities claim the 54-year-old also sent at least four other threatening letters to Rihanna’s home in California.

In a truly chilling courtroom moment, the New York City judge compared McGlynn to Mark David Chapman, John Lennon's killer.

On December 8, it will be 34-years since Chapman gunned down The Beatles legend in broad daylight, outside his Manhattan home, which is located approximately 80 blocks from where Rihanna now resides.

The judge added that McGlynn is a "ticking time bomb who is wholly fixated on [Rihanna] and poses a direct threat of serious physical harm or death to her and anyone around her."

According to Reuters:

Judge Marrazzo said McGlynn "wrote a series of notes to the singer that made references to murder and sexual assault. He also accused Rihanna and other artists of using his material in their songs."

McGlynn was found unfit to stand trial on stalking charges back in September—he was subsequently committed to a psych hospital in Staten Island, but has since filed a petition for release.

As well as making it clear that McGlynn will be arrested if he goes anywhere near Rihanna’s home, Judge Marrazzo also barred him from contacting the singer via email, phone or written letter.