MANHATTAN SUPREME COURT — More than 30 years ago, the man accused of killing Etan Patz told his former wife that he had strangled a “gringo,” she testified in Manhattan Supreme Court Monday.

Daisy Rivera said that before they were engaged, an “emotional” Pedro Hernandez, who is now on trial for the crime, told her he had “something to tell me because he didn’t want any secrets," Rivera testified. "He continued to explain to me that something terrible had happened when he was in New York.”

She said that Hernandez told her someone approached him on the street in New York, describing the person as “a young man, a muchacho," and also as "a white man, a gringo.”

Hernandez's confession to Rivera is one of several he has made about the murder of the 6-year-old SoHo boy who disappeared without a trace in 1979 after walking to the school bus alone for the first time, prosecutors said.

Rivera testified that Hernandez didn’t give much detail as to the reason for the murder, only saying that a person came toward him and he “felt violated.”

“It had gotten out of hand and it ended up that he put his hands around the person’s neck and he had strangled him,” she said, holding back tears.

“He said that he had put him in the dumpster and he had covered him, threw some plastic bags or something over the body,” she continued.

Hernandez confessed to police in May 2012 that he had strangled Patz in the basement of the SoHo bodega where he worked, and dumped the small child’s body in the trash.

His lawyers argue that Hernandez’s confession was coerced, and that he has a very low IQ and suffers from delusions.

Prosecutors say Hernandez has confessed to several people over the years, because of his guilt, but he’s controlled the details he lets out. He’s given several different versions of the story of the alleged murder.

Hernandez met Rivera through a church group in 1982, when he was 21 and she was 16. The pair, who have two children together, were only married for a couple of years.

She also testified that when they were living together, she found a “piece of a poster, it had a picture of a little boy.” Rivera claims that the photo was from the “Missing Child” poster that had been plastered all over New York at the time of Patz’s disappearance. She said she confronted Hernandez about the picture, thinking he had another child. He explained, she said, that it was a child that lived in the neighborhood where he had worked, and he had gone missing.

The defense contends that Rivera is making up the story about the poster, saying she is disgruntled after years of battling Hernandez for child support money.

Rivera, who described Hernandez as “controlling,” has been to court with her ex-husband multiple times over his lack of child support payment.

Hernandez's trial is expected to last up to three months.