Mazzei ruled "There is probable cause" to believe Rex Heuermann committed at least some of the Gilgo Beach murders "and, therefore, a basis to compel the buccal swab."
The swab is to be taken while Heuermann is in the presence of his attorney, who had opposed it.
The judge said a comparison of the Heuerman's direct DNA sample with the mitochondrial sample from a hair recovered from one of the victims and the DNA found on the pizza crust outside Heuermann's office "will yield probative material evidence, whether it is inculpatory or not."
A direct DNA sample could also be entered into statewide and nationwide databases. Mitochondrial DNA is ineligible.
The ruling comes after attorneys for accused Gilgo Beach serial killer opposed a request by prosecutors for a DNA swab from their client.
The defense argued in court papers that the Suffolk County District Attorney failed to demonstrate probable cause that their client killed anyone.
[Ads /]
"Gathering his DNA is extremely important to this case," Suffolk County Sheriff Errol Toulon said. "From what the task force has gathered and what we have discussed, I have no doubt that he is the person that killed those three women."
Heuermann pleaded not guilty in the killings of three women whose remains were found near Gilgo Beach in 2010. He is the prime suspect in a fourth murder as well.
While he has not yet been charged in that fourth homicide, the investigation "is expected to be resolved soon," the document says.
MORE GILGO BEACH COVERAGE
TIMELINE: Gilgo Beach murders: Complete timeline of events leading up to Rex Heuermann's arrest
[Ads /]
EVIDENCE SEARCH: Gilgo Beach Murders: Police use excavating tools to dig up Rex Heuermann's backyard
Gilgo Beach: Search crews use excavator to dig up suspect's backyard
THE INVESTIGATION: | Rodney Harrison delves deeper into Gilgo Beach murder investigation
Rodney Harrison dives deeper into Gilgo Beach murder investigation
[Ads /]
THE VICTIMS: Who are the 'Gilgo Four?'
What we know about the victims in the Gilgo Beach murders
CHILLING VOICEMAIL: Woman shares chilling voicemail left by Gilgo Beach murder suspect Rex Heuermann
Woman shares chilling voicemail left by Gilgo Beach murder suspect
----------
* More Long Island news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube