Former Philadelphia Municipal Court Judge Joseph C. Waters Jr. was sentenced Thursday to two years in prison for fixing cases on behalf of campaign donors and political allies, making him the latest in a string of city jurists facing time behind bars for breaking their oaths.

The punishment, worked out as part of a deal with prosecutors and approved by U.S. District Judge Juan R. Sanchez, comes four months after Waters, 61, pleaded guilty to single counts of mail and wire fraud.

In addition to his prison term, he was also ordered to pay a $5,500 fine - the estimated sum of all the campaign donations and gifts of event tickets and alcohol he received as bribes.

At his sentencing hearing Thursday, Waters described his actions as an "aberration" in a career otherwise devoted to upholding the law - first in the Marine Corps, then in the Philadelphia Police Department, and finally as a judge.

"Honest to God, I'm here today to say I screwed up," Waters said, in front of a courtroom packed with family, police officers, defense lawyers, and even former Pennsylvania Supreme Court Justice Seamus P. McCaffery, who resigned last year in the midst of a pornographic e-mail scandal.

"I was given a sacred trust," Waters said. "I betrayed that trust. I'm deeply regretful of that."

Sanchez seemed to struggle with what would prompt Waters - a former police captain, a Temple Law grad, a Fulbright scholar, and a devoted Catholic - to jeopardize his standing by accepting bribes. He compared his actions to those of three ex-Philadelphia Traffic Court judges who have recently been sentenced for lying about a ticket-fixing scheme.

"Sometimes," the judge said, "very bright people do very stupid things."

Waters, first appointed to the bench in 2009 by Gov. Ed Rendell, resigned his office in September, days before the criminal charges against him were announced.

According to prosecutors, he sought to influence two cases before other municipal judges as a favor to those willing to help him in future elections.

The first involved a midlevel player in city Democratic circles, who was identified in court filings only as a "politically active businessman." Sources close to the case have identified him as Samuel G. Kuttab, a frequent donor who routinely hosted elected officials for dinners and ran several businesses, including a real estate management and security firm that was sued in 2011 over a $2,700 debt.

Prosecutors allege Kuttab turned to Waters in hopes of securing a favorable ruling. Waters, in turn appealed to a colleague - Municipal Court Judge Joseph O'Neill - who was scheduled to hear the case. FBI agents caught their conversation on a wiretap and hours later, O'Neill found in Kuttab's favor.

When the party suing Kuttab's company threatened to appeal, Waters intervened to work out a $600 settlement between the parties and to avoid the scrutiny of a higher court.

The second case came months later, when a campaign donor who was working with the FBI asked for Waters' help involving a felony gun case against her cousin. Unbeknownst to the judge, however, the cousin was actually an undercover agent facing fabricated criminal charges.

Waters contacted Municipal Judge Dawn Segal and asked for help on his friend's behalf. When the case came up for a hearing in July 2012, Segal reduced the felony gun charge to a misdemeanor - a ruling prosecutors say was made "without proper legal basis."

O'Neill and Segal were removed from judicial duties after Waters' guilty plea last year, pending a review of their actions by the state Judicial Conduct Board. Neither has been charged with a crime, the board has issued no findings on their cases, and both have repeatedly declined to comment.

Segal's lawyer, Stuart L. Haimowitz, said in an interview Wednesday that the conversations his client had with Waters about the gun case had no effect on her ruling. She made an honest mistake in reducing the felony charge because of a misunderstanding of the law, he said.

"A good judge's name and reputation is being sullied in the legitimate outrage over Waters' conduct," said Haimowitz. "We hope this may be rectified soon."

Still, said Richard Barrett, the federal prosecutor who oversees public corruption investigations for the U.S. Attorney's Office, Waters' actions were even more "abhorrent" because they involved others on the bench.

"This case presents an assault on our court system," he said.

Waters did not disagree. Not once Thursday did his defense lawyers, Michal J. Engle and Peter F. Vaira, offer an explanation for his crimes, instead focusing on his reputation at home, in past jobs, at church, and at the halfway house he has worked at since his conviction.

"I've been over it and over it, and I can't point out a single incident and say there was a switch that got turned," Waters said. "I wasn't paying enough attention to my professional responsibility. My head was just out of the game."

He is scheduled to report to prison next month.