“He confessed to the group,” Mr. Rivera said.

The story of the prayer group could prove pivotal in bolstering the case against Mr. Hernandez in the 1979 disappearance of Etan Patz, 6, in Manhattan. Last week, Mr. Hernandez, 51, was arrested because he confessed to killing the boy in the basement of the SoHo bodega where he worked, near Etan’s home, after luring him from his first unaccompanied walk to the bus stop, the authorities said. He told the police he put the body in a bag and a box, which he left on the street.

Mr. Rivera, 76, acknowledged that police detectives from New York came to question him last week.

“The detectives told me not to say anything,” he said.

“I am keeping my mouth shut,” he added, miming a zipper across his lips.

In a case like Etan’s, with no physical evidence linking the suspect to the crime, any past statements by Mr. Hernandez regarding the boy’s disappearance and death could be crucial in corroborating his confession.

There is no body, DNA, fingerprints or any other forensic evidence to speak of — only a confession from a man who is said to be taking psychiatric medications and has had diagnoses of schizophrenia and bipolar disorder.

Mr. Hernandez, who has pleaded not guilty in the case and remains under observation at Bellevue Hospital Center in Manhattan, came to the attention of the police after a tip from one or more people describing past statements he had made. It is unclear whether any tips came from the prayer group.