A senior at the Air Force Academy will be dismissed from the Air Force and confined for 30 months after pleading guilty on Tuesday to possession of child pornography.

Cadet 1st Class Jacob Cook also pleaded guilty during a general court-martial to two specifications of recording the private areas of civilians with a cellphone camera without their consent and when they had a reasonable expectation of privacy, the academy said in a release.

In addition to his dismissal and confinement, a military judge ordered Cook to forfeit all pay and allowances.

Another charge ― abusive sexual contact ― was dismissed.