A former suspect in the 1979 disappearance of a New York City boy walked out of a northeastern Pennsylvania prison Wednesday morning after more than a quarter-century behind bars and was promptly arrested by state police, accused of a Megan’s Law violation.

Jose Antonio Ramos lied to police about where he planned to live after his release, supplying the Bronx address of a cousin who hadn’t lived there in decades, according to arrest papers.

“When he walked out of the main gate, he was taken into custody by troopers,” Pennsylvania State Police Lt. Richard Krawetz said.

Ramos, 69, was arraigned on a felony charge of failure to register as a sex offender. A magistrate set bail at $75,000, and Ramos was sent to the Luzerne County jail.

He had long been suspected in the disappearance of 6-year-old Etan Patz, who vanished May 25, 1979, after leaving his Manhattan home to go to a bus stop two blocks away. Ramos had been dating the boy’s baby sitter.

Etan’s disappearance prompted a massive international search and spawned a movement to publicize cases of missing children. His photo was among the first put on milk cartons, and his case turned May 25 into National Missing Children’s Day.

His parents never moved or changed their phone number, in case he returned. In 2001, they obtained a court order officially declaring him dead.

Ramos had previously declined a jailhouse interview with The Associated Press, citing civil ligation against the prison.

“After Nov. 7, 2012, I will be available to meet with you and any other members of the media at a secure location in Manhattan for an interview. Please let me know if it’s convenient for you,” he wrote.

Ramos entered the Pennsylvania prison system on March 27, 1987, and served all of his 27-year sentence for molesting two other boys. He was released from the prison in Dallas on Wednesday morning after being given credit for the time he’d spent in county jail prior to his conviction.

A few weeks before his release, Ramos’ counselor and a prison records specialist had him fill out the required Megan’s Law registration form, according to court documents.

But when New York City police checked out the address he provided, they found no one living there who knew Ramos. And when police tracked down the cousin whose name Ramos had listed, she told them she hadn’t had any contact with him in 35 years and did not plan to allow him to live with her.

“Family members were frightened of Ramos when he would visit,” a police affidavit said.

While Pennsylvania Department of Corrections staff make sure that departing inmates fill out the registration forms completely and provide additional assistance to sex offenders who can’t read and write, it’s the responsibility of the inmate to provide accurate and truthful information, department spokeswoman Susan Bensinger said.

“There is only so much we can do to encourage the inmate to fill out the form correctly,” she said. “As far as being accurate, that’s up to the offender.”

But defense lawyers who represent sex offenders in Megan’s Law cases said they suspect Ramos was set up to fail. They said long-term inmates often don’t know where they will live and mark down a long-ago address because that’s the one they know.

Prison staff “would have had every opportunity prior to his exit to say, ‘Hey, did you know that Great Aunt Sadie doesn’t live there?”’ said Elisabeth K. H. Pasqualini, an attorney in Millersburg, Pa. “This could have all been prevented.

To be convicted of violating Pennsylvania’s Megan’s Law, Ramos must be found to have knowingly misled state police. Court documents say prison staff warned him he’d be committing a felony if he didn’t follow the requirements of the law.

Earlier this year, a new suspect named Pedro Hernandez was charged with Etan’s murder after police said he confessed. Hernandez’s lawyer, Harvey Fishbein, has said Hernandez, of Maple Shade, N.J., is mentally ill, and authorities have not cited any additional evidence to implicate him beyond his own admission.

Ramos was declared responsible for Etan’s death in a civil court in 2004, but the Manhattan district attorney’s office has said there wasn’t enough evidence to charge him criminally. Ramos has denied any involvement in Etan’s disappearance.

Prosecutors are expected this month to announce whether they believe there’s enough evidence to continue pursuing a case against Hernandez, who worked at a convenience store near Etan’s home when the boy disappeared and told police he strangled the boy and stuffed his body in a trash bag.

The Manhattan district attorney’s office had no comment Wednesday. Etan’s parents have asked to be left alone and did not respond to messages. An attorney for Hernandez, the current suspect, declined to comment.