LUBBOCK, Texas– A former City of Lubbock official wants to stay out of jail, recent court documents said, after he accepted a plea deal in federal court in May for possession of child pornography involving a prepubescent minor.

Justin David Musgraves, the former deputy director of Emergency Management, was caught with thousands of images and/or videos of child pornography, court documents said.

Musgraves was both a City of Lubbock employee and a volunteer firefighter with the City of Shallowater. He had a tablet computer owned by Shallowater in his possession.

RELATED STORY: Ex-Lubbock official got caught watching child pornography inside his city office

He was ordered on June 11 to explain why he should not go to jail, per the federal indictment. However, Musgraves and his attorney filed a motion for continued pretrial release pending his prison sentence.

According to court records, a federal judge said Musgraves has to meet certain conditions in order to be released.

Child pornography is defined as a crime of violence. So, Musgraves had to show he gets an exception to the rule.

Once he is sentenced, Musgraves could go to prison for no more than 20 years.