A former investigator for the Prince George's County State's Attorney's Office pleaded guilty to a first-degree sex offense on Friday.

James Artis was accused of pinning down a female coworker at the state's attorney's offices at the county courthouse in Upper Marlboro, according to NBC Washington. He was fired after charges were filed in June.

Artis previously denied the allegations, saying he touched the woman in an effort to comfort her.