Updated

A Bronx High School of Science teacher was sentenced to seven years in federal prison on Thursday for purchasing nude photos from teenage boys, the New York Daily News reported.

Jon Cruz, 34, already had pleaded guilty last fall to a count of receiving child pornography. He searched for the boys on social media and the chat app KIK in order to obtain explicit photos in exchange for money, according to reports.

Federal officials said they had found 40 naked photos of underage victims on Cruz’s home computer.

MARRIED SUBSTITUTE TEACHER, 30, ACCUSED OF SEX ACTS AND LEWD TEXTING WITH EIGHTH GRADE STUDENT

"Some of these communications displayed sexually explicit images of his genitals," Cruz said about one of the underage victims while making his plea.

Prosecutors said the Manhattan resident carried out the crimes from July 2014 through December 2015 on a school computer. They said he posted a picture of a former student as he enticed teenage boys to send him photographs, sometimes nude.

He reportedly worked at the high school as a substitute teacher in 2006 and became a full-time teacher in September 2011. He was arrested in March 2015 and resigned in the same month.

City Education Department officials declined to comment on the sentencing.

The Associated Press contributed to this report.