A person officially charged with the safekeeping of inmates, whether the inmates are awaiting trial or have been sentenced and confined in a state correctional facility, local detention facility, or prison camp or work camp, may use necessary force to maintain internal order and discipline and to prevent the escape of an inmate lawfully in his custody without regard to whether the inmate is charged with or convicted of a felony or misdemeanor.
S.C. Code § 24-13-30