A defense lawyer for suspected Long Island serial killer Rex Heuermann argued in court filings Tuesday that prosecutors have failed to show probable cause connecting him to a DNA sample taken from a pizza box outside his office as she failed to convince a New York judge to deny the district attorney's request for a cheek swab.

There is no shortage of pizza in New York City, where the 59-year-old Heuermann built his architecture firm.

However, the FBI allegedly observed Heuermann discarding a pizza box outside his Manhattan office before his arrest in July — and with it, lab testing allegedly found DNA matching evidence at the Gilgo Beach crime scene with the body of victim Megan Waterman, 22.

HOW ‘UNTRACEABLE’ BURNER PHONES HELPED POLICE BUST ALLEGED GILGO BEACH SERIAL KILLER

Image on left shows pizza box with partly eaten crust inside, right shows suspected serial killer Rex heuermann entering court wearing handcuffs, slacks, a buttondown shirt and a blazer

Left, an image of the pizza box the FBI allegedly recovered from outside Rex Heuermann's office in Manhattan. Right, Heuermann, the architect accused of murdering at least three women near Long Island’s Gilgo Beach, appears before Judge Timothy P. Mazzei in Suffolk County Court in Riverhead, New York, on Aug. 1, 2023. (Suffolk County District Attorney's Office | James Carbone/Newsday via AP, Pool)

The defense filing asserts that prosecutors failed to show a direct connection between Heuermann and the pizza box, leaving open the possibility that the DNA belongs to someone else who happened to be eating pizza right outside Heuermann's Fifth Avenue office more than a decade after Waterman's murder.

"The People (prosecutors) essentially concede that they have no evidence establishing that defendant Rex A. Heuermann actually ever came into contact with the pizza crust or the used napkin found in the discarded pizza box," Heuermann's court-appointed lawyer Danielle Coysh wrote. 

Read the filing (Mobile users go here)

"By the People's own admission, the nexus between the partially eaten pizza crust and used napkin and the defendant Rex A. Heuermann is at best a matter of conjecture and assumption, not fact," she added.

Coysh also took issue with a witness description of the man believed to be the last person to see another victim, Amber Costello, 27, alive. 

"There is no claim defendant Rex A. Heuermann was ever identified through either a corporeal or photographic identification as that person," she argued.

REX HEUERMANN'S WIFE PICTURED FOR FIRST TIME AS SHE FILES FOR DIVORCE FROM GILGO BEACH SERIAL SLAYING SUSPECT

Megan Waterman smiles with bleached blonde hair.

Megan Waterman was 22 years old when she vanished on June 6, 2010, on security video from a Holiday Inn Express hotel in Hauppauge, New York. Suffolk County police found her remains on Dec. 13, 2010, near Gilgo Beach during the search for Shannan Gilbert. (Suffolk County Police Department)

Judge Timothy Mazzei, however, granted the prosecution's request for a swab, while also granting Coysh's request that the defense be present when it is taken.

"The DNA found on the pizza crust and napkin, will yield probative material evidence, whether it is inculpatory or not," he wrote in a decision obtained by Fox News.

GILGO BEACH SUSPECT REX HEUERMANN STALKED EX-COP AFTER TRAIN ALTERCATION, RIDER SAYS

Coysh did not immediately respond to a request for comment.

Read the judge's decision (Mobile users go here)

Heuermann has pleaded not guilty to six counts of murder for the deaths of Waterman, Costello and Melissa Barthelemy, 24.

Suffolk County prosecutors have also described him as the prime suspect in the death of a fourth woman, Maureen Brainard-Barnes, 25, whose remains were found near the other three.

File photo of Gilgo Beach murder victim

Amber Lynn Costello’s remains were found near Gilgo Beach, New York, on Dec. 13, 2010. (Suffolk County Police Department)

Prosecutors said in court last week that they planned to turn over more than 2,500 pages of documents and over 100 hours of video to the defense.

In addition to the pizza box DNA and a description of the suspect from Costello's former pimp, investigators also used phone records to zero in on Heuermann after a new task force was created to investigate the cold case in 2021.

GILGO BEACH MURDERS: THE INVESTIGATION IN PHOTOS

File photo of Gilgo Beach murder victim

Melissa Barthelemy’s remains were found near Gilgo Beach, New York, on Dec. 11, 2010. (Suffolk County Police Department)

Suffolk County District Attorney Ray Tierney said last month that police also found Heuermann's wife's DNA on some of the victims, believed to have been transferred there without her presence. She was out of town during each of the murders and has not been accused of a crime.

CLICK HERE TO GET THE FOX NEWS APP

Her husband allegedly met sex workers on the internet and through dating apps, then killed them and dumped their bodies on a remote stretch of Ocean Parkway about 45 miles east of New York City, near his suburban home in Massapequa Park.

Maureen Brainard-Barnes smiles with her hood up wearing a pink sweatshirt

Maureen Brainard-Barnes was 25 years old when she was last seen alive in July 2007. She was reported missing on July 14, 2007. (Suffolk County Police Department)

Police discovered the four women's remains while searching for another missing woman, Shannan Gilbert, who vanished after calling 911 in another beach community on the same parkway. Six other bodies were also recovered nearby.

WATCH: ‘GRIM TIDE’ ON FOX NATION

Heuermann is due back in court Aug. 15.

He faces up to life imprisonment without the possibility of parole if convicted.