A West Point cadet convicted of collecting and distributing child pornography has been sentenced to more than eight years in prison.

The U.S. attorney's office says Granger, Indiana, resident Ricky Patrick Hester was sentenced Wednesday to 97 months in a federal court north of New York City. A jury found the 25-year-old guilty in June.

Prosecutors say Hester used email, a file-sharing account and his cellphone to collect and share images of boys being forced into sexual activity. His phone was seized in 2013 after a search of his U.S. Military Academy dorm room. Prosecutors say the phone contained 1,200 images and videos of children engaging in sexual activity.

Hester's lawyer said the government's search of his room was improper.

West Point officials are taking steps to discharge Hester.

___

This story has been corrected to show Hester is still a cadet and his discharge pending.