A Berkeley County sheriff's deputy was arrested Monday on federal weapons charges.

Tony Allen Riley, 60, of Goose Creek, was charged with two counts of selling a firearm to a prohibited person, according to U.S. Attorney Bill Nettles.

Riley was employed as a deputy during the incident and when he was arrested, according to a news release from the U.S. Attorney's Office. He had previously retired as a sheriff's captain.

Berkeley County Sheriff's Office spokesman Dan Moon said Riley is no longer employed by the department.

"I was surprised and disappointed to learn today of the arrest of Tony Riley by federal officials," Berkeley County Sheriff Wayne DeWitt said in a statement Monday. "Mr. Tony Riley has already been terminated from his employment with the Berkeley County Sheriff's Office. We are disappointed in Mr. Riley's conduct and want to assure the public it does not reflect on the integrity of other members of the Sheriff's Office."

The case was investigated by the FBI, Nettles said.

The case has been assigned to Assistant U.S. Attorney Nick Bianchi of the Charleston office for prosecution.

The maximum penalty Riley could receive is a fine of $250,000 and/or imprisonment of 10 years on each count.

In 2012, Riley was demoted for his part in the release of James Sanders, a domestic violence suspect who walked out of the Hill-Finklea Detention Center and was at large for several weeks.

Riley filed a grievance over the discipline, but the demotion stood, according to news accounts.

Reach Brenda Rindge at 937-5713 or @brindge on Twitter.