A Suffolk judge ruled Friday that homicide detectives illegally arrested and questioned a Mastic man charged with killing a young mother, and barred prosecutors from using any evidence gained from that encounter.

But state Supreme Court Justice John Collins ruled that a second arrest of Dante Taylor, 20, a month later was proper, and DNA and fingerprint evidence obtained as a result is admissible at trial.

Taylor is charged with first-degree murder, accused of raping and stabbing Sarah Goode, 21, of Medford, a medical technician and mother of a toddler, on June 7, 2014.

StoryDefense: Murder suspect was illegally arrestedStoryLawyer: Cops illegally obtained evidenceStoryCops: Mom tweeted about threats before murder

Assistant District Attorney Janet Albertson said the ruling was "disappointing, but not wholly unexpected."

Because evidence resulting from the second arrest isn't affected, she said the case remains strong.

Defense attorney John Lewis Jr. of Farmingdale said he wished the judge had gone further and found no probable cause to arrest Taylor at all.

advertisement | advertise on newsday

During a pretrial hearing in August, one detective said Albertson ordered him to not even bother testing a DNA sample police collected from Taylor at his first arrest on June 10, 2014, before Goode's half-naked body was found.

In his decision, Collins wrote that there were several problems with that "unsatisfactorily explained arrest."

Det. Guido Cirenza testified during the hearing that Taylor was taken to the Seventh Precinct for questioning about Goode's disappearance, but he was not under arrest. But Collins noted that police pulled Taylor out of his car, put him in handcuffs and would not let him go to the bathroom without an escort.

"Here, testimony established that the defendant had to believe he was in custody," Collins wrote, adding that detectives did not advise Taylor of his rights. As a result, Collins ruled that DNA, palm prints and evidence from searches conducted as a result of the questioning were all tainted and inadmissible at trial.

Collins ruled that a second arrest of Taylor a month later in Florida was proper. Police collected a second DNA sample then and again took his palm prints.

Taylor's DNA matched a swab from Goode's body and his palm print was found near a bloody smear on Goode's abandoned BMW, prosecutors have said. The car had more blood smears inside and a clump of her hair was found stuck in the passenger doorjamb.

Police focused on Taylor because Goode's family members believed he had phoned her shortly before she disappeared. After detectives obtained cellular site data -- improperly without a warrant, Lewis argued -- they saw he was traveling from Mastic toward Medford as the two talked.

That was not a legally sufficient reason to arrest Taylor, Lewis said. Police became aware of evidence that ties him to the crime, such as the DNA and the palm print, only as a result of that first, improper arrest, the attorney argued.

advertisement | advertise on newsday

Collins suppressed bloody clothing seized from Taylor's residence because police took it without a warrant. Albertson said the blood was Taylor's and is therefore unimportant to the case.

The judge also held that jurors should not hear that Taylor told detectives after his second arrest, "I'm not going to be able to handle the rest of my life in prison." That statement is prejudicial and had limited relevance to Taylor's guilt or innocence, Collins wrote.

Jury selection is scheduled to begin Nov. 17.