New York: The murder trial against a man accused of killing Etan Patz got underway Friday, with opening statements made in a proceeding that prosecutors hope will finally lay to rest a question that for decades has tormented the Patz family and, in a sense, all of New York City: What really happened to the 6-year-old boy?

The answer, a prosecutor said, was hidden in various references that the defendant, Pedro Hernandez, made in the early 1980s to a few confidants: He told them he had killed a boy some years ago.

That is as far as his admissions went, and Hernandez, who had worked in a bodega near where Etan was last seen, lived a quiet life in New Jersey, avoiding the spotlight and “always wondering when his dark secret would come out,” the prosecutor, Joan Illuzzi-Orbon, said.

“Today is that day,” Illuzzi-Orbon continued. She told jurors in state Supreme Court in Manhattan: “You will hear his chilling confession. What you will see is someone who very keenly controls the information he puts out.”

But Hernandez’s lawyer, Harvey Fishbein, said the trial might never resolve what happened to Etan. He said Hernandez, 53 — who faces charges of second-degree murder and first-degree kidnapping — was a mentally ill man with a low IQ who told a fictional tale to the police after a long interrogation.

“He has visions; he hears voices,” Fishbein said. “He cannot distinguish between what is real and what is not.”

Illuzzi-Orbon transported a packed courtroom back to the New York of the late 1970s and asked jurors to relive one of the world’s most infamous missing-child cases. The overflow crowd included the Manhattan district attorney, Cyrus R. Vance Jr., who was seated a few rows behind Etan’s father and sister.

Etan vanished on May 25, 1979, while walking from his apartment to a bus stop two blocks away. It was the first time his parents had allowed him to go to school on his own.

At the time, the neighbourhood was filled with artists carving up loft spaces. Neighbours kept an eye on one another’s children, and the corner deli could be a haven for them with candy, snacks and soda shops, Illuzzi-Orbon said.

“A time when hippies, not hipsters, graced the streets of downtown Manhattan,” she said. “This is the moment we’re about to step back into, and into a crime that changed the face of this city forever.”

In the early 1980s, Hernandez told his ex-wife, a friend and a church group about his crime, the prosecutor said, but withheld some information and changed details to avoid getting caught. Illuzzi-Orbon said Hernandez came clean with detectives in May 2012, after a brother-in-law called the police and told them about family stories recalling Hernandez’s memories of killing a child in New York City.

Detectives from New York picked up Hernandez at his home in Maple Shade, New Jersey, and took him to the Camden County prosecutor’s office for questioning. In three videotaped statements, Hernandez described, more than once, how he throttled the boy in the basement of the bodega where he worked. But, the prosecutor noted, Hernandez never explained why.

“You will see him bob and weave around the motive for the killing,” Illuzzi-Orbon told the jury.

Then she suggested the motive was sexual. “Why did the defendant do this?” she said. “You can imagine choking is not the first thing that happened to Etan. It is the second.”

Fishbein said his client had told the detectives a fictional story that did not square with other evidence gathered in the 35-year-old case. The evidence will show, he said, that Hernandez has hallucinations and received a diagnosis of a personality disorder that makes it hard for him to distinguish between fantasy and reality. He also has a low IQ score, about 70.

“He’s inconsistent and unreliable, yet he’s the only witness against himself,” Fishbein said.

Illuzzi-Orbon said the evidence would paint a different portrait of Hernandez, showing him as a cunning and manipulative loner, wracked with guilt, who “wanted to unburden himself but doesn’t want to get caught.”

She said Hernandez quit his job at the bodega the day after Etan disappeared and returned to Camden County, where his family lived. Within months, he gave up his Roman Catholic faith and joined a Pentecostal church because, she said, it allowed members to seek forgiveness directly from God without the intercession of a priest. He got a job at a coat factory.

The prosecutor said Hernandez first mentioned having killed a child to members of his church during a religious retreat at a farm. He told one member, Ramon Rodriguez, that he had stabbed a boy and chopped up his body. Later, he burst into tears during a prayer meeting and said he had sexually assaulted and killed a boy in New York.

Hernandez also told a childhood friend, Mark Pike, that he had murdered a boy who had thrown a ball at him, the prosecutor said, and described to his first wife, Daisy Hernandez, how he killed a teenage boy who offered to have sex with him.