The mayor of Fairfax City, Virginia, was arrested early Friday after police say he tried to give methamphetamine to undercover detectives in exchange for sex.

Mayor Richard “Scott” Silverthorne, 50, was nabbed in the parking lot of a Crowne Plaza Hotel as part of a sting operation, the Fairfax County Police Department said in a news release. He was charged with felony distribution of methamphetamine and misdemeanor possession of drug paraphernalia.

The operation began in late July, when the department’s Organized Crime and Narcotics Division received a tip about a meth distributor.

The suspect – later identified as Silverthorne – was allegedly distributing meth through a website used to arrange casual sex between men, Fairfax County Capt. Jack Hardin said at a news conference. He declined to name the site.

An undercover detective created a fake profile with information that police believed Silverthorne was looking for in terms of characteristics and activities he was interested in.

It worked, Hardin said. Silverthorne contacted the detective within two days, and then they began to communicate over texts, he added.

Police set up a drug-fueled romp between Silverthorne and a group of undercover detectives, and the mayor allegedly agreed to bring meth along with other men.

Hardin said Silverthorne first met the cops in the parking lot, and he told them he was waiting for his meth supplier, who was running late. Once he arrived, Silverthorne procured about 2 grams of meth, and then handed it to one of the undercover detectives.

That’s when he was arrested, Hardin said.

“He did not resist,” he added. “He provided a full confession on everything he did that night.”

Two other men were arrested in connection with the case as alleged suppliers: Juan Jose Fernandez, 34, and Caustin Lee McLaughlin, 21, both of Maryland. They were each charged with felony distribution of methamphetamine and misdemeanor possession of drug paraphernalia, among other counts.

It was unclear which of the men was Silverthorne’s supplier during the sting.

Hardin, however, said McLaughlin resisted arrest and police used a Taser to subdue him.

A fourth unnamed man invited by Silverthorne for the group encounter was initially held, but then let go.

“By all facts that we know in reference to this case, all parties were adults,” Fairxfax County Police Maj. Ed O’Carroll told reporters. “We have no knowledge that any underage individuals were involved.”

All three arrested were taken to the Fairfax County Adult Detention Center, and then turned over to the Fairfax County Sheriff’s Office. It was not immediately clear if Silverthorne had an attorney.

A city spokeswoman said city officials had no immediate comment on the mayor’s arrest.

In May, Silverthorne won his third term as mayor of Fairfax, a city of 24,000 just west of Washington, D.C. He had also been employed as a substitute teacher for the Fairfax County Public Schools since April, but was terminated, a spokesman told NBC News on Friday.

Silverthorne ran his re-election campaign while he suffered a bout of personal setbacks – including filing for federal bankruptcy last September, losing his home to foreclosure and then being diagnosed with squamous cell carcinoma. The condition is a sometimes aggressive but nonlethal form of skin cancer, and Silverthorne was undergoing treatments, according to The Washington Post.

At the time, he had just been laid off from his job as a director of recruitment with the National Association of Manufacturers.

“Now I’m bouncing back,” Silverthorne told The Post after winning re-election. “The city of Fairfax made me the comeback mayor.”