By Natasja Sheriff

NEW YORK (Reuters) - Prosecutors in the trial of a man accused of the decades-old murder of a New York City boy tried in court on Tuesday to undermine arguments by the defense that an earlier suspect committed the crime.

Pedro Hernandez, 54, a former grocery clerk, is accused of kidnapping and murdering 6-year-old Etan Patz in 1979 after telling police in 2012 that he choked the boy, stuffed him in a box and left him in a New York alley.

His attorneys blame Jose Antonio Ramos, a convicted child molester and longtime suspect in the case. Ramos' girlfriend used to walk Patz to school in his downtown Manhattan neighborhood.

The defense says Hernandez is mentally ill and that his confession was coerced by police.

Patz vanished as he walked alone for the first time to a school bus stop on May 25, 1979. His disappearance sparked a national movement to find missing children, with his picture one of the first to appear on milk cartons.

On Monday, former federal prosecutor Stuart GraBois testified that Ramos told him in 1988 that he took a young boy to his apartment for sex on the day Patz disappeared and that Ramos felt “90 percent sure” the boy was Patz.

When the boy resisted, Ramos said he put him on a subway to visit an aunt, said GraBois, who led the Patz investigation from 1985 to 1991.

Prosecutor Joan Illuzzi-Orbon argued on Tuesday there was no evidence that Ramos and Patz ever met.

Ramos' girlfriend worked for the Patz family for less than a month in April 1979, and Ramos never came along when she walked the boy and his friends home from school, she said.

In a 1982 videotaped interview with police played in court, Ramos said he never met Patz.

Outside state Supreme Court in Manhattan, defense attorney Harvey Fishbein said Ramos' girlfriend said earlier she could not remember whether Ramos met Patz.

"The point is, Ramos was always on the hunt and had ample opportunity to meet Etan Patz," he said.

Ramos served 27 years in a Pennsylvania prison for the rape and molestation of three young boys in the 1980s. He was released in 2012 but returned to prison for breaking sex offender registration laws.

A judge found Ramos legally responsible for the death of Patz in a 2004 civil suit brought by the Patz family. Patz has never been found.

(Reporting by Natasja Sheriff; Editing by Ellen Wulfhorst, Eric Beech and Peter Cooney)