BROOKLYN - A former Brooklyn Tech high school teacher pleaded guilty and has been sentenced to five years in prison after admitting to inappropriate relationships with seven students.

The District Attorney's Office says Sean Shaynak, 45, who taught math and physics at Brooklyn Technical pleaded guilty yesterday to nine of the 36 counts against him in exchange for serving five years in prison. 

Investigators say he admitted that between March 2012 and August 2013 he shared nude photos, had inappropriate conversations with several of the students and even abducted a 15-year-old, taking her to a nude beach in New Jersey without her parents’ consent.

In a statement the District Attorney's Office says, "In part, this guilty plea spares the young victims from having to testify publicly at trial and in graphic detail." 

The District Attorney's Office also says in addition to never being allowed to teach inside of a classroom again and spending five years in prison, Shaynak will also have to register as a sex offender.