A former D.C. high school teacher pleaded guilty in federal court Wednesday to exchanging pornographic images with a teenaged student.

John Solano, 30, was arrested in March on the campus of McKinley Technology High School in Northeast, where he taught science.

According to the plea agreement, Solano exchanged sexually explicit text messages with a 16-year-old male student. At the teacher’s request, prosecutors said in court filings that the student sent Solano explicit photos of himself.

Solano, who has been in jail since his arrest, is scheduled to be sentenced on Oct. 2 before U.S. District Judge Rosemary M. Collyer, and faces up to 20 years in prison and a $250,000 fine.