A former district judge who extorted business owners for bribes, boasted of his ability to control the votes of other elected officials, and lorded over his working-class Bucks County township like an old-school political boss was sentenced Monday to 6½ years in federal prison.

Prosecutors described John I. Waltman’s staggering list of misdeeds — which ranged from fixing a traffic ticket to conspiring to launder $400,000 in what he believed to be proceeds from the illegal sale of drugs — as “a complete abdication of his responsibility as a judge and a public figure.”

But as Waltman, 61, stood before U.S. District Judge Gene E.K. Pratter, he maintained that he entered public service in Lower Southampton Township decades ago with a genuine intent to improve his community — a motivation that became twisted along the way into a fixation on amassing money and power.

“I want to apologize to the citizens of Bucks County and the citizens of Lower Southampton Township,” he said. “I’ve completely betrayed your trust, and you deserved much, much better.”

Monday’s hearing in Philadelphia federal court effectively ended Waltman’s career in public service and began to close the book on a scandal that has roiled Lower Southampton, a working-class community of 19,000 people, since his arrest along with three other township officials.

Several members of Lower Southampton’s police force sat in the courtroom’s back row Monday to watch the sentencing of the man they blamed for tarnishing the reputation of law enforcement in their community.

Meanwhile, Waltman’s lawyer, Louis R. Busico, urged Pratter to consider the good that his client had done, both in his family and in public life. He acknowledged, though, that the former judge’s crimes were vast.

“He has earned the ignominy of this indictment. He has earned the disrepute,” Busico said. “He will forever be the embarrassment of Lower Southampton Township.”

Waltman, a former constable and onetime chairman of Lower Southampton’s Republican committee, served for six years as a district judge after he was appointed in 2010 to replace his sister, who was drummed out of office amid a corruption scandal of her own.

During his tenure, he oversaw minor criminal proceedings and preliminary hearings for defendants facing criminal trials — including Lee Kaplan, the Bucks County man convicted in 2017 of sexually abusing six sisters who had been “gifted” to him by an Amish couple.

But it was his family’s connection to Lower Southampton’s GOP that allowed him to cultivate deep ties in local politics that extended far beyond his small courtroom in Feasterville.

Caught on an FBI wire, he boasted of his ability to swing votes on Lower Southampton’s Republican-held township council in exchange for kickbacks. He surrounded himself with a network of government employees to aid in those corrupt plans, including a deputy constable, Bernard Rafferty; the township’s former solicitor, Michael Savona; and its public safety director, Robert Hoopes.

All three men, like Waltman, have pleaded guilty to crimes ranging from extortion to conspiracy to commit money laundering, and face their own sentencings in the coming weeks.

In all, prosecutors accused them of five criminal schemes, including attempts to shake down a business seeking to build a billboard in a park and to pressure a Florida investment firm to sell land it owned in the township to a buyer with whom Waltman had a financial relationship.

Hoopes, who was working as a lawyer at the time, admitted in a hearing last year that he impersonated the township’s solicitor during a call with the investment firm’s representative and threatened to bury the company under zoning and regulatory obstacles until it gave in to Waltman’s demands.

But ultimately, it was the money-laundering scheme that led to their undoing.

Waltman, Hoopes, and Rafferty did not know that the two New York businessmen who approached them in 2015, claiming to have made hundreds of thousands ripping off insurance companies and illegally selling their drugs, were actually two undercover IRS agents recording their every word.

Waltman eagerly agreed to help them and over the next year, he and Hoopes washed $400,000 for the men — which they handed over in duffel bags stuffed with cash — through a consulting company set up by Rafferty.

He even suggested he could help his criminal partners buy a bar in Feasterville to use as a permanent money-laundering front.

Waltman sought to explain that thinking in court Monday, suggesting that the vacant storefront he hoped the new bar would occupy had once been “the heartbeat” of Lower Southampton. He hoped that establishing a new business there would help renew the township’s vitality — even if its new tenants were criminals.

“I kidded myself into thinking it was OK to do something bad for the greater good,” Waltman told Pratter.

But that rationale gave the judge pause. She asked him: “If someone came before you [as a judge] and said, ‘Sure, I was breaking the law, but nobody was getting hurt,’ would that win the day in front of you?”

In addition to serving his prison term, Waltman was ordered to pay a $5,000 fine, serve two years of probation, and complete 150 hours of community service upon his release. He is set to surrender to prison July 18.