A former Grapevine air traffic controller accused of arranging to have sex with a 13-year-old girl while at the Sturgis Motorcycle Rally in South Dakota has pleaded guilty to a federal charge in the case.

Timothy C. Gravens, 54, was one of nine men arrested in a sex sting during the rally in August.

On Wednesday, he pleaded guilty to a federal charge of commercial sex trafficking. As part of a plea agreement, federal prosecutors in South Dakota dismissed a child pornography charge.

Sturgis, a town of about 6,500 in the Black Hills, welcomed more than 467,000 visitors to the rally, according to the rally website. Law enforcement officials jailed 412 people and were called 864 times during the weeklong event, statistics show.

Gravens, who faces 15 years to life in prison, remains in custody and is scheduled to be sentenced June 23 in Rapid City, S.D.

He was indicted after trying to have sex with a 13-year-old girl, but he had asked for a 10-year-old girl, according to court documents. During the arrest, he was found with computer files containing child pornography.

Gravens, who has since retired, worked at the Fort Worth Air Route Traffic Control Center at the time of his arrest in August, a Federal Aviation Administration official told the Star-Telegram in September.

Gravens rolled into the motorcycle rally Aug. 5 on a black 2012 Harley-Davidson, looking for a man who had agreed to provide him a girl for sex, according to an affidavit in support of the criminal complaint.

The man, whom Gravens had spoken to after reading an ad on Craigslist.org, was actually an investigator with the South Dakota Internet Crimes Against Children Task Force, the affidavit said. To lure men to the sting, undercover officers created ads using age-regressed photographs of adult women.

According to the affidavit, Gravens asked whether the man had a 10-year-old girl and agreed to pay $300 for one hour with her as long as he could take pictures and did not have to wear a condom. Gravens said he would be a repeat customer if the man could find girls younger than 10.

He had $300 and two cameras when he was arrested, the affidavit stated.