An Air Force Academy cadet got 30 months in prison after he pleaded guilty Tuesday to possession of child pornography and secretly videotaping women in the shower.

The pleas were part of a deal struck between senior cadet Jacob Cook and prosecutors to spare the honor student from trial on an additional charge of groping a woman and cut years from the maximum 20-year sentence.

Prosecutors want Cook to serve five years behind bars. His defense team asked for two years spent in a military sex offender treatment program. The judge split the difference at the end of the day.

Cook, a computer science major, asked for mercy in often tearful testimony offered on Tuesday.

“I love the Air Force and I never wanted to bring discredit to it,” Cook said Tuesday morning.

The cadet was pursued by internet crimes detectives after the social media site Twitter told authorities that Cook was uploading child pornography. Authorities found hundreds of questionable pictures on Cook’s electronic equipment. In court, he admitted a fetish for young teenaged girls.

Read the full story on Gazette.com.