A former judge who served Galveston County, Texas, was convicted Wednesday of online impersonation after using the pseudonym “Don Tequila” to post fake escort ads of two ex-girlfriends.

Christopher Dupuy, 47, was sentenced to six years in prison for posting the women’s photos and phone numbers in an act of online revenge, the Houston Chronicle reported.

Dupuy had posted photos from the women’s Facebook accounts in sex-for-hire ads he bought on Backpage.com. Federal agents seized and shut down the website in April as part of an investigation into prostitution and human trafficking, KHOU-TV reported.

BACKPAGE.COM, CEO PLEAD GUILTY IN CALIFORNIA, TEXAS AND ARIZONA

The ex-judge was initially arrested and charged with impersonation in July 2015, and spent a year in jail, the paper reported. Dupuy was released a year later after a visiting county judge ruled the state’s online impersonation statute unconstitutional.

JUDGE RECALLED BY VOTERS AFTER BROCK TURNER SEX ASSAULT CASE SEEKING DONATIONS TO PAY OFF LEGAL FEES

An appellate court later overturned the visiting judge’s decision after a woman in Harris County filed a complaint accusing Dupuy of calling her 200 times in one night and threatening her life, according to the Chronicle. A warrant was then issued for the former judge’s arrest. That case is still pending.

CLICK HERE TO GET THE FOX NEWS APP

Dupuy resigned from the bench in 2013, after serving for four years, while facing charges of lying under oath and abuse of office. He pleaded guilty and received two years of deferred adjudication for the misdemeanor charges, the paper reported.