Authorities say a deputy has been fired after being caught on video beating a South Carolina inmate dozens of times in the legs with a baton or pipe.

The South Carolina Law Enforcement Division said Monday that state police and the FBI are investigating whether the civil rights of inmate Charles Shelley were violated. Columbia television station WIS-TV aired the surveillance video of the beating Thursday and reported that Shelly's leg was broken and he needed stitches.

Kershaw County Sheriff Steve McCaskill said the deputy was fired. The sheriff did not give the deputy's name.

Shelley told the station he had been arrested on an outstanding warrant and other violations. WIS said the deputy reported the inmate threatened him.