In September 2011, Lawrence Jones, then 26, was arrested for having a relationship with a 15-year-old girl.
Six months later, he agreed to plead no contest to misdemeanor counts of indecent assault and corruption of minors, while the prosecution dropped felony statutory sexual assault.
Under the terms of the plea, Mr. Jones would serve probation set by the court -- Common Pleas Judge Donald E. Machen gave him two years -- and meet a number of special conditions, including mental health treatment designed for sex offenders, and staying away from minors.
Nowhere in the agreement or at his March 5, 2012, plea hearing was there ever any mention of having to register as a sex offender under Megan's Law.
In fact, none of the charges that Mr. Jones faced, including the original statutory sexual assault, fell under the state law requiring a defendant to register in a publicly accessible database.
So months later, when Mr. Jones was notified by the Pennsylvania State Police to comply with the new Sex Offender Registration and Notification Act, which took effect in December 2012, Mr. Jones was mad.
He filed an immediate appeal with Judge Machen, asking him to enforce the original plea agreement. When that was rejected, he filed a petition with the state Superior Court.
"I would not have pled [no contest] if I had been told that this was a possibility," he wrote. "I am not guilty and would have gone to trial. I am not receiving the benefit of the [plea] bargain."
Mr. Jones, who faced the prospect of a 25-year registration period, raised two issues in his appeal: that he cannot be required to register under a statute not in effect at the time of the plea; and that the prosecution committed a breach of contract by violating the terms of his plea agreement.
Last month the Superior Court, in a 2-1 decision, ruled in Mr. Jones' favor based on his contract argument. It did not consider the ex post facto claim.
"Neither party to the negotiated plea could have anticipated the imposition of more severe sanctions ... than stated on ... the record," wrote Superior Court Judge David Wecht. "Based upon this agreement, Jones sacrificed his fundamental constitutional rights [to a jury trial.] He cannot fairly be denied the benefit of his bargain."
But the questions around the new registration requirements are far from settled. In Allegheny County, alone, the district attorney's office has filed 31 answers to similar petitions involving sex offender registration cases and has said that it will appeal the decision in the Jones case.
Across the state, there are likely dozens, if not hundreds more working their way through the Pennsylvania courts system.
More than that, the issue remains in question nationally, as well.
What the law says
The Sex Offender Registration and Notification Act falls under the federal Adam Walsh Child Protection and Safety Act of 2006, which marked the 25th anniversary of the kidnapping and murder of the 6-year-old.
The law expanded the number of offenses that fall under registration requirements, and also created a federal sex offender registry. It also required all states to adopt its provisions or face the possibility of losing grant funding.
In Pennsylvania, the state version of the act became effective on Dec. 20, 2012, replacing what was known as Megan's Law.
The registration requirements applied to anyone who at the effective date was currently serving a sentence for a covered sex offense -- meaning that if a subject was in prison, on probation or parole, he or she must register.
It applied even if, as in Mr. Jones' case, the conviction offense did not require registration.
David Freed, president of the Pennsylvania District Attorneys Association, said his group had a lot of discussion about the issues that would likely arise in the months leading up to the effective date for the state act.
In Cumberland County, where he serves as district attorney, his office attempted to proactively identify any cases where a defendant had specifically negotiated a plea agreement allowing him or her to avoid the registration requirements of Megan's Law.
In those cases, he said, his office joined in the defense petitions asking that the registration requirements not be implemented.
"Those are the ones we joined in to enforce the spirit of the bargain that we made," Mr. Freed said. He estimated that occurred in less than 10 cases.
But in cases like Mr. Jones' -- where the record does not show that registration was specifically bargained out of the deal -- the new law should apply, he said.
Superior Court President Judge Emeritus Kate Ford Elliott said the same in her dissenting opinion.
"I agree that, collateral or not, the registration requirements have serious and restrictive consequences for the offender, and that there is a fundamental unfairness worked by the result I suggest herein," she wrote. "However, I believe we are bound by precedent to decide that requiring registration subsequent to the plea, where there once was none ... does not affect the validity of a guilty plea unless the consequences of registration have been specifically bargained for and are not just a result of the plea."
Mr. Freed's interpretation of the Superior Court decision in Mr. Jones' case is this: "They perceive this as unfair, and they're trying to find a way to make this guy not have to register," Mr. Freed said.
But, he continued, "the law says he should be required to register."
Robert Carey, who represented Mr. Jones, 29, of Fineview, in his appeal, disagrees.
"When you enter into a plea, the defendant waives a lot of rights. There shouldn't be any surprises as to what the sentence is."
Punishment or collateral consequence?
The U.S. Supreme Court, in 2003, ruled in a case out of Alaska, that sex offender registration requirements are not punitive.
Instead, the court called them "collateral consequences" of conviction.
The original goal of registration found by the courts, Mr. Carey said, was not to penalize the defendant, but to provide information to the public.
But with the risk of losing housing and employment, and possibly going to prison for not registering, he continued, "It clearly is punitive.
"It certainly goes beyond providing information for the public."
By finding that registration is not punitive, the courts allowed for the law to be applied retroactively, said Corey Rayburn Yung, a law professor at the University of Kansas.
Mr. Carey believes the courts' thinking is "outdated," that registration is punitive, and therefore is an ex post facto violation of Mr. Jones' rights.
Mr. Yung countered by saying that sex offenders have the ability to avoid the punishment associated with registering by simply complying with the law.
"They have the chance to register for life and not go to prison, so it's not punitive."
Since the passage of the Sex Offender Registration and Notification Act, the laws governing registration have become more complicated, Mr. Yung said.
Among the requirements facing sex offenders include having to register in each jurisdiction where they work, live or go to school; having to report periodically in person; and having their information publicly accessible online.
"It's been a mess," Mr. Yung said. "There was not a lot of forethought. And when it comes to sex offenders, they're generally going to lose. They are not sympathetic defendants."
In some instances, a state offense may not require registration, but federally, it does.
Tom Pavlinic, an attorney who specializes in defending people accused of sex crimes, said the idea that registration isn't punitive is "ridiculous.
"It's more punitive than a jail sentence," he said. "They're treated like the worst form of humanity."
Mr. Pavlinic said he has had clients who opt to plead guilty and go to jail to avoid having to register.
"I don't know what can be more punitive than a restriction that impacts the rest of your life."
Paula Reed Ward: firstname.lastname@example.org, 412-263-2620 or on Twitter @PaulaReedWard.