A teacher and debate coach at the prestigious Bronx High School of Science was arrested on Friday on charges that he persuaded teenage boys to send him nude or suggestive photographs via cellphones in exchange for gift cards.

According to a criminal complaint filed in Federal District Court in Manhattan, between August 2014 and February, the teacher, Jon Cruz, paid three boys — two 15-year-olds in New Mexico and one 14-year-old in upstate New York — to send him photographs of themselves. He paid one of the boys in New Mexico over $500 in gift cards to send him nude photographs that showed him posing with an erection in front of a mirror, the complaint says. In the other photographs, the boys were clothed and showed off parts of their bodies.

Mr. Cruz, 31, chatted with the boys using the messaging app Kik, pretending to be a high school student, the complaint says. He used a fake name and the photograph of a former Bronx Science student to disguise his age. The Federal Bureau of Investigation traced the Kik account to Mr. Cruz using Internet protocol addresses, which can show the location of a computer. Two addresses used to access the account were linked to his home; a third was associated with the New York City public school system, the complaint says.

Mr. Cruz was charged with one count of production of child pornography, one count of receiving child pornography and one count of possessing child pornography, according to the United States attorney’s office in Manhattan. He appeared in court but did not enter a plea, and was granted a $1 million personal recognizance bond.