MANDAN, N.D. - A Mandan High School social studies teacher faces criminal charges after writing a sexually explicit book that authorities say is about two of his students.

Police said Scott Allan gave the book to the 17- and 18-year-old female students as a graduation gift. Police said the characters in the book have the same first names and similar last names as the two students, and in it they engage in sexual acts.

Allan was placed on administrative leave May 22 and resigned later that day.

He turned himself in Wednesday on charges of promoting obscenity to minors, a Class C felony, and disorderly conduct, a Class B misdemeanor.