Updated

A New Jersey insurance attorney was tied to a string of cold-case rapes through a drinking glass, Boston prosecutors revealed at his arraignment.

Matthew Nilo, 35, appeared in Suffolk Superior Court Monday on charges he raped three women he picked up in a car and sexually assaulted a fourth while she was jogging in the Charlestown neighborhood in Boston in 2007 and 2008. 

Nilo allegedly committed the brutal attacks after graduating high school but wasn't arrested until last week at his home in Weehawken, New Jersey.

The Boston Police Department and FBI used forensic genetic genealogy, which combines DNA analysis with historical and genealogical records, to zero in on Nilo in 2022, Assistant District Attorney Lynn Feigenbaum said in court.

NEW JERSEY ATTORNEY LINKED TO STRING OF BOSTON RAPES APPARENTLY PROPOSED TO FIANCEE WEEKS BEFORE ARREST

Matthew Nilo in court

Matthew Nilo is arraigned on rape charges in Suffolk Superior Court in Boston, Monday, June 5, 2023. His attorney, Joseph Cataldo is at left. (Pat Greenhouse/The Boston Globe via AP, Pool)

Investigators matched the DNA profile left on the three rape victims to the profile of at least one of Nilo's relatives, which had been uploaded to a public DNA database, and narrowed their suspect pool to the cyber insurance claims attorney, Feigenbaum said.

But authorities had to confirm their hunch and earlier this year began surveilling Nilo, who was working at Cowbell Cyber in Manhattan.

NEW JERSEY ATTORNEY ACCUSED OF BOSTON RAPE SPREE THROUGH DNA REPRESENTS ‘NEW TYPE OF CRIMINAL’ SUSPECT: EXPERT

They got their break after obtaining a drinking glass he'd used at a corporate event, which matched the DNA profile left on the three rape victims.

Nilo pleaded not guilty Monday to three counts of aggravated rape, two counts of kidnapping, one count of assault with intent to rape and one count of indecent assault and battery. Judge Edward Curley set bail at $500,000 and ordered Nilo to wear a GPS tracker if he's released.

Matthew Nilo fiancee in court

A woman believed to be Matthew Nilo's fiancée watches his extradition hearing in Hudson County Superior Court on Thursday, June 1, 2023, in Jersey City, New Jersey. (Kevin C. Downs for Fox News Digital)

His fiancée appeared in court but declined to comment, according to local news outlet WCVB5.

Prosecutors said the rape spree began when Nilo was 19, about a year after he graduated from the Boston Latin School, and disclosed harrowing new details of the attacks.

A 23-year-old woman was leaving a bar when she couldn't find her car Aug. 18, 2007, and a man she didn't know offered to help. Instead of locating her car, he drove her to Terminal Street.

HOW DNA IDENTIFIED AUSTRALIAN FAMILY MAN AS ESCAPED US FUGITIVE WHO MURDERED HIS PARENTS

"The male told her to shut up or he would kill her," then raped her in the grass near a set of railroad tracks, Feigenbaum said.

He allegedly struck again in November of that same year. Another 23-year-old woman, who'd left a bar after attending her high school reunion, allegedly climbed into Nilo's car believing it was a taxi.

A split image of Matthew Nilo in court and Matthew Nilo partying with friends

Genetic genealogy led investigators to serial rape suspect Matthew Nilo of Boston. (Kevin C. Downs for Fox News Digital/ Facebook)

Instead of taking her home, he allegedly flashed a knife, drove her to Terminal Street and raped her.

In August 2008, he targeted a 36-year-old woman who was panhandling near Boston Common. Nilo allegedly offered her money if she got into his car, then drove her to the same street.

FORMER MA NAVAL OFFICER SENTENCED TO 18 MONTHS FOR THREATENING EX-WIFE, HER MOTHER

"Shortly after they got out of the car, he tackled the victim to the ground, held a gun to her back, and raped her both vaginally and anally," the prosecutor said.

The three victims reported the assaults and their rape kits yielded the same male DNA profile, which was entered into Combined DNA Index System but did not return a hit.

Matthew Nilo poses near a cliff overlooking San Francisco

According to Matthew Nilo's since-deleted Facebook page, he recently proposed to his fiancée. (Facebook/Matthew Nilo)

Nilo has also been charged with the sexual assault of a 44-year-old woman, whom he allegedly ambushed as she jogged on Terminal Street.

"The victim fought him off using her gloved hand to poke at his eyes," Feigenbaum said.

The glove was later sent to a private lab and testing determined that the DNA profile on the garment was 314 times more likely to belong to Nilo than any other male in the population, according to prosecutors.

Nilo's attorney, Joseph Cataldo, told Fox News Digital that his client denies the allegations.

Matthew Nilo wearing a Celtics jersey

Nilo was arraigned Monday in Suffolk County Superior Court, in Massachusetts, on charges he sexually assaulted four women from 2007 to 2008. (Facebook/ Matthew Nilo)

"Mr. Nilo maintains his innocence. If the government obtained DNA evidence from my client without a search warrant then the constitutionality of that action will certainly be challenged in court," Cataldo said. 

Nilo appeared to be a respected and productive member of society, earning his bachelor's degree in psychology at the University of Wisconsin - Madison and later graduating from the University of San Francisco Law School.

CLICK HERE TO GET THE FOX NEWS APP

Since leaving Massachusetts, Nilo has lived in Wisconsin, California, New York and New Jersey. Authorities urged other potential victims to contact Boston police or the FBI. 

Fox News' Audrey Conklin contributed to this report.