A New York State Supreme Court Judge ruled Monday that prosecutors may use the confession of the man charged with strangling 6-year-old Etan Patz to death in 1979.

In denying the motion to suppress the confession of Pedro Hernandez, the defendant in the case, Justice Maxwell Wiley said Hernandez did have the mental capacity to waive his rights to have an attorney present and understood that he had the right to remain silent.

The 53-year-old Hernandez has pleaded not guilty to the murder of Patz, who disappeared one morning while walking alone to his school bus stop. His disappearance led to a massive manhunt, but New York detectives were unable to bring charges in the case until 2012, when police officers received a tip that led them to Hernandez, who had been a stock clerk at a store in Patz's neighborhood.

On May 23, 2012, officers escorted Hernandez to the Camden County prosecutor's office in New Jersey, where they interrogated him for about seven hours. They did not record most of the interrogation, only turning on recorders close to when Hernandez was about to confess. Officers also waited until several hours into the interrogation to give Hernandez a Miranda warning, instructing him on his rights against self-incrimination.

Today's ruling to admit Hernandez's confession hinged on whether the court accepted that the Miranda warning was properly administered and that Hernandez was mentally capable of waiving his rights. Experts for Hernandez testified that he has an IQ as low as 67 and had been taking antipsychotic medication for more than a decade at the time of the interrogation.

In a written opinion, Wiley said that Hernandez's performance on psychological tests, "along with evidence of his actual waiver of his rights, and of his basic ability to make his way in the world over a period of almost forty years" led the court to conclude that he was capable of "appreciating the nature of the rights he was giving up when he spoke to the police and assistant district attorney."

"This decision doesn't go to the reliability of the facts," said Harvey Fishbein, Hernandez's attorney. "It's about whether they're legally admissible."

Fishbein has argued that Hernandez falsely confessed to the murder. "It's clear that when [the police officers] are done with [Hernandez], he comes out believing he did something wrong," said Fishbein, who contends that his client made up the confession under pressure from the police.

Prosecutor Joan Illuzzi Orbon has contested that argument, saying Hernandez had completed the 11th grade in high school, attended to household finances, successfully applied for Social Security disability benefits and held long-term jobs as evidence that he was mentally capable of waiving his rights.

Patz's body has never been found. He was the first missing child to have his face printed on milk cartons and the day of his disappearance is now National Missing Children's day.

Patz's father, Stan Patz, was the only family member present for Monday's ruling. He declined to comment.

Update, Feb. 14, 2017: A Manhattan jury on Tuesday convicted Pedro Hernandez of murdering 6-year-old Etan Patz in 1979. The jury accepted the prosecution’s argument that Hernandez, then a teenage clerk in a bodega near Patz’s home, lured the boy into the store’s basement, strangled him and disposed of the body in a box on the city streets. The first trial of Hernandez resulted in a hung jury.

Related coverage: For more on the story, read about the missing boy and the evidence against his accused killer.