A tearful Thomasine Tynes, former president judge of Philadelphia Traffic Court, pleaded guilty Wednesday to pocketing a $2,000 Tiffany bracelet given to her by an undercover agent who secretly taped the exchange as part of a sting.

Common Pleas Court Judge Thomas Gavin told Tynes that she should have realized before accepting the gift at the Palm restaurant in Center City in 2011, "I'm sitting down to have lunch with a snake. Why am I doing that?"

Now, he said, Tynes will be "remembered as someone who sat down with a snake - and you got bit."

The judge also had a few sardonic words for Pennsylvania Attorney General Kathleen G. Kane. He noted that Kane had declared that evidence against Tynes and four other Democratic officials implicated in the sting was too flawed to bring charges.

The investigation was resurrected by Philadelphia District Attorney Seth Williams, who, like Kane, is a Democrat.

"I want to begin first by applauding the efforts of the Philadelphia District Attorney's Office for picking up this case, which the current attorney general said was unwinnable," Garvin said.

"Obviously, today's events in this case indicated that these supposedly unwinnable cases are very much winnable."

He added: "But even if they weren't, they needed to see the light of day so that the citizens of Philadelphia would have an understanding of who the elected officials were that they put in places of trust."

Tynes pleaded guilty to a charge of conflict of interest, telling the judge, "All I can say is, I'm so sorry. . . . It was wrong and I recognize that."

Her attorney, Louis Busico, worked out a plea deal with prosecutors. Garvin, a Republican from Chester County brought in to hear the case because of Tynes' local ties, sentenced Tynes to up to 23 months in prison. But he agreed to make the sentence concurrent with her pending two-year federal term in an unrelated case.

Tynes, 71, is to report to federal prison soon for her conviction on charges of lying to a grand jury investigating ticket fixing at Traffic Court.

Tynes was among five Democratic officials to become involved with undercover operative Tyron B. Ali, who handed out cash or, in Tynes's case, jewelry. Two of the officials remain under grand jury scrutiny; two others were charged this week.

Ali taped Tynes as she promised to help him land a government contract.

In court Wednesday, Tynes testified that she had tried and failed to give the bracelet back to Ali.

Only minutes before, Assistant District Attorney Mark Gilson, who is leading the sting reinvestigations, had told the court that Tynes, in a taped conversation, had called Ali in November 2011 - three months after she accepted the bracelet - to tell him she was under federal investigation. The federal probe, Gilson said, prompted her to try to return the bracelet.

The Philadelphia grand jury that recommended charges against Tynes cited the fact that reporters from The Inquirer had questioned her early this year before breaking the news of the sting.

Quoting from The Inquirer's article, the grand jury's presentment noted that Tynes had "provided a series of evolving accounts of what she did with the bracelet" - ranging from saying she had returned it to saying she had lost track of it.

District Attorney Williams held the bracelet aloft on the day Tynes was arrested.

Busico, her attorney, told the judge that "this case started out horrifically" with officials who had engaged in "shameful conduct."

In the end, though, Tynes' plea delivered an important message: "She is not above the law," Busico said, "because she's now held accountable."