Fairfax County, Virginia Mayor Scott Silverthorne is a proud Democrat who endorsed Hillary Clinton in the presidential election. Now, however, he has found himself in prison after he was arrested for giving methamphetamine to an undercover police officer in exchange for sex.

The Washington Post reported that Silverthorne, 50, plead guilty to one count of distributing drugs after prosecutors said that he arranged an orgy with an undercover police officer in exchange for methamphetamine on a sex site called Bare Back Real Time. Police had already set up a fake account to catch Silverthorne after they were tipped off to what he was doing.

Silverthorne will remain in custody until he is sentenced on June 9.

Though Silverthorne is facing up to 40 years in prison, his lawyer Brian Drummond said that he will likely be sentenced to just a few months or a year since he is a first-time offender and has a long record of public service.

“The facts were such that it would have been futile to go to trial,” Drummond said after the hearing. “The statute for distribution in Virginia is very broad, and he is at the lower end of the spectrum. He is guilty of the transaction, but he didn’t get any money for it.”

Assistant Commonwealth’s Attorney Kathleen Bilton told the court that Silverthorne had initiated the conversation to arrange the orgy-for-drugs swap and it eventually moved from the website to text messages. He then met with two undercover officers and two acquaintances in the parking lot of the Crowne Plaza Hotel in Tysons Corner. After Silverthorne got about two grams of meth worth about $200 from his dealer who was also on scene, police arrested the men.