A former Boston teacher has admitted to child exploitation crimes , the U.S. Attorney's Office in Massachusetts said Thursday.

John Magee Gavin , 35, of Brookline, was accused of having sexual conversations with minors he connected with online and asking them to send explicit photos to him.

Stream NBC10 Boston news for free, 24/7, wherever you are. WATCH HERE

He pleaded guilty to one count of coercion and enticement of a minor, one count of receipt of child pornography and one count of possession of child pornography in federal court in Boston.

The former teacher, who prosecutors said worked at the Josiah Quincy Upper School in Boston and the Academy of the Pacific Rim Charter Public School, as well as Brookline Public Schools, is accused of owning a Discord account that m

See Full Page