Testifying at the Etan Patz murder trial as a witness for defendant Pedro Hernandez, a prominent former FBI agent who once headed the Sept. 11, 2001, investigation said Friday she had recommended prosecution of a different man in the 6-year-old's 1979 disappearance.

Mary Galligan, who handled the Etan probe in the early 1990s before moving on to a lead role in FBI terror cases, said the work of two informants convinced her in 1991 that convicted pedophile Jose Ramos, a friend of a woman who walked Etan to school, should be charged by the Manhattan district attorney.

Galligan, now a private-sector cybercrime specialist, was not allowed to detail her opinions by Manhattan Supreme Court Justice Maxwell Wiley, and later was told by an FBI official not to answer when reporters asked whether she still felt Ramos was the culprit.

More storiesComplete coverage: Etan Patz case

"You know what my answer would be," she said, smiling, before declining to comment.

Etan vanished in SoHo on May 25, 1979. Hernandez, 53, a former bodega worker from Maple Shade, New Jersey, was charged by the district attorney after saying in a disputed 2012 confession that he strangled Etan in the bodega's basement.

Defense lawyers contend the confession was a delusion caused by mental problems. This week, they pivoted to casting suspicion on Ramos, calling Galligan, former federal prosecutor Stuart GraBois and prison informant Jeffrey Rothschild to re-create the federal case and tell jurors about Ramos' purported confessions and near-confessions.

advertisement | advertise on newsday

Galligan, a 25-year FBI veteran who once headed the New York office, said she and GraBois decided to use informants to get an explicit confession after Ramos admitted he was "90 percent sure" a boy he had sex with on May 25, 1979, and put on a subway to Washington Heights was Etan.

She said Rothschild's reports of admissions by Ramos that the boy was in fact Etan "appeared to be truthful." But she said technical problems got in the way of surreptitiously catching Ramos on tape, and he was coy when she met him.

"OK, it could have been Etan Patz," Ramos said, according to Galligan. "But even if it was Etan Patz, I put him on a subway for Washington Heights and we should go look for him there."

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

Galligan said a federal prosecution wasn't possible because there was no evidence of crossing state lines. Prosecutors in the Hernandez trial contend the case against Ramos was full of holes because he didn't do it and the federal informants weren't credible.