Colonel William R. Jones, former vice commander of the 20th Fighter Wing at Shaw Air Force Base in Sumter, South Carolina, entered a guilty plea on Wednesday after being charged with “wrongfully possessing images and videos of child pornography.” He had reportedly served 24 active-duty years with the Air Force.

“Jones was relieved of duty as vice commander in 2016. He had become vice commander in 2014,” Military.com reports. “He had been a command pilot and instructor with more than 2,000 flight hours and was reassigned to a desk job as deputy chief of safety for the Ninth Air Force headquarters at Shaw.”

The disgraced commander claims that he had been seeking legal pornography, but his downloads sometimes contained images of minors. Jones admitted that he knew the search terms he used would likely turn up some child pornography, but not exclusively. He argued that there was no way to separate illegal content from the legal in the torrent downloads.

“He said he would delete folders when it became apparent that the images were not what he wanted,” The Sumter Item reports. “He also admitted that he did not delete the entire series of photos in most cases and said a small percentage of the pornography that he possessed contained minors.”

The thousands of images found on his computer and other devices reportedly depicted females who appear to be as young as 10 years old.

Jones is now facing up to 10 years in prison, could be ordered to forfeit all pay and allowances and will likely be dismissed from the Air Force. The trial continued on Thursday.

This latest military scandal comes as the Naval Criminal Investigative Service is investigating a leak of nude photos of female Marines at Camp Lejeune.

The Department of Defense is looking into the case, after photos of as many as two dozen women assigned to the base were shared on a private Facebook page called “Marines United,” which boasted nearly 30,000 followers. It appears as though some of the women were unaware that they were being photographed.