Richard 'Scott' Silverthorne
Richard 'Scott' Silverthorne will resign as mayor of Fairfax, Virginia after being caught in a drugs-for-sex sting Handout

The mayor of Fairfax, Virginia, has resigned after being arrested for allegedly offering to exchange methamphetamines for sex, said city officials.

Mayor Richard "Scott" Silverthorne was arrested and charged with felony distribution of methamphetamine and possession of drug paraphernalia, after he provided drugs to officers taking part in a sting operation, police said.

His resignation will come into effect Thursday (11 August), CBS affiliate WUSA-TV reported.

The officers had contacted Silverthorne through a website, where he offered drugs in exchange for a "group sexual encounter", police said.

Silverthorne "did not resist" arrest, said Fairfax County Capt Jack Hardin, as quoted by NBC. "He provided a full confession on everything he did that night."

Two other men, Juan Jose Fernandez, 34, and Caustin Lee McLaughlin, 21, were also arrested in connection with the case, and have been charged with felony distribution of methamphetamine and misdemeanour possession of drug paraphernalia, according to NBC.

Silverthorne was elected to serve his third term as mayor in May, after a tumultuous year in which he filed for bankruptcy, lost his home to foreclosure and was diagnosed with cancer.

His contract as a supply teacher with Fairfax County Public Schools was terminated after the arrest, reported CBS.