McLEAN, Va. -- The mayor of the Virginia city of Fairfax is resigning after his arrest last week in which police say he attempted to trade drugs for sex in a sting operation.

City officials said in a news release Monday that R. Scott Silverthorne's resignation will take effect at noon Thursday.

Silverthorne was arrested last Thursday on a felony drug distribution charge. Police say they received a tip that Silverthorne was using a dating website to set up sexual encounters with other men in exchange for drugs.

Police set up a sting operation, posting a profile on the website that they expected would appeal to him. Within two days, police said, Silverthorne contacted the undercover officers through the website to set up a meeting.

On Thursday evening, police said, Silverthorne gave an undercover detective two grams of methamphetamine outside a Tysons Corner hotel before his arrest.

On Friday, after police announced the arrest at a news conference, Silverthorne appointed a city councilman, Jeffrey Greenfield, as temporary acting mayor. But calls continued for Silverthorne to resign entirely.

Silverthorne did not respond to phone calls, text messages and emails seeking comment. He is currently free on personal recognizance while he awaits a preliminary hearing Oct. 31.

The city council has scheduled a special meeting Tuesday night; the mayor and council had been on recess for the month of August.

In a news release, the city said it expects to follow state law in filling the vacancy caused by Silverthorne's departure.

Under the state code, the city council would appoint a mayor to serve until a special election could be held.

The city said day-to-day operations are continuing as normal under the direction of the city manager.

Greenfield, the acting mayor appointed by Silverthorne, did not immediately respond to an email seeking comment Monday morning.

Silverthorne was elected in May to a third term as mayor of the bedroom community of about 24,000 residents, 20 miles west of the nation's capital.

Silverthorne, who also worked as a substitute teacher in Fairfax County Public Schools, was fired from that job after his arrest.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)

More From New Jersey 101.5 FM