NEW YORK (Reuters) - A New York City jury on Tuesday found a former delicatessen worker guilty of murdering Etan Patz, a 6-year-old boy whose disappearance had been one of the highest-profile unsolved cases in the United States for nearly 40 years.

FILE PHOTO - Pedro Hernandez appears in Manhattan Criminal Court in New York, U.S. on November 15, 2012. REUTERS/Louis Lanzano/Pool/File Photo

The conviction of Pedro Hernandez, 56, came during his second trial in state court. It followed a 2015 mistrial that occurred after a single juror refused to go along with 11 other panelists who were convinced of his guilt.

Jurors found Hernandez guilty of murder and kidnapping but acquitted him on a second murder charge. After the verdict was read in court, Patz’s father, Stan, shared hugs with prosecutors.

“The Patz family has waited a long time, but we have finally found some measure of justice,” Stan Patz told reporters, speaking softly as he sat alongside prosecutors in the courtroom. “I’m really grateful this jury finally came back with what I’ve known for a long time: that this person, Pedro Hernandez, did a really terrible thing.”

The boy vanished as he walked alone to a school bus stop in the city’s SoHo neighborhood on May 25, 1979.

The case raised awareness of the plight of abducted children and their parents: Patz became one of the first missing children to appear on milk cartons seeking information, and his disappearance also helped bring about a national database of such cases.

Hernandez confessed to police in 2012, saying on videotape that he had lured the child to the basement of the deli where he worked near the Patz home and strangled him.

He later recanted, and his attorneys argued the confession was the product of mental illness, including hallucinations, and coercion by the police.

Patz’s body was never found despite a massive search, and prosecutors had no physical evidence tying Hernandez to the disappearance. Instead, they relied largely on Hernandez’s confession and on statements he had made to others over the years referring to the kidnapping.

Slideshow ( 2 images )

Hernandez’s court-appointed lawyer, Harvey Fishbein, said he would challenge the verdict.

“There will be an appeal, because over the years we have established serious legal errors in this case, and I hate to say it, but I’m confident we will be back here someday,” he told reporters.

Hernandez is scheduled to be sentenced on Feb. 28.

In addition to arguing that Hernandez suffers from mental illness, defense lawyers pointed the finger at another suspect, an imprisoned child molester named Jose Ramos who was long considered a prime suspect in Patz’s disappearance.

The verdict came on the ninth day of deliberation, following a three-month trial.

Jurors in the 2015 trial deliberated for 18 days without reaching a unanimous verdict, which is required for conviction. Some of the jurors in the first trial returned to observe the second trial.

Several jurors on Tuesday told reporters the deliberations were difficult but that they had resolved disagreements respectfully.

One juror, Mike Castellon, said the jury accepted that Hernandez suffered from mental illness but concluded he could still tell “right from wrong.”

“The defense threw a lot of theories out there - I call it spaghetti on the wall,” he added.

In a statement, Manhattan District Attorney Cyrus Vance said the case had “haunted” families across the country for decades.

“Etan’s legacy will endure through his family’s long history of advocacy on behalf of missing children,” he said.