A former Cobb County high school coach and teacher was sentenced to two years in prison Tuesday after pleading guilty to exchanging sexually explicit images with a student.

Ryne Thomas Thackston, 30, of Acworth, was a girl’s track coach at North Cobb high School in March 2013 when it was discovered that he had sent nude images of himself to a student on the team he coached, said Kimberly Isaza, spokeswoman for the Cobb County District Attorney’s office.

Thackston also had sexual images of the girl on his phone, Isaza said in an email.

She said that on Feb. 11, midway through a bench trial, Thackston pleaded guilty to one count of sexual exploitation of children and one count of electronically furnishing obscene material to minors.

At Tuesday’s sentencing hearing, Cobb Superior Court Judge Stephen Schuster sentenced Thackston to five years, with two years to serve in custody and the rest on probation.

“This sentence will send a message to high school students about the dangers of the behavior they engage in over electronic media,” Cobb Assistant District Attorney Hannah Palmquist said. “It will send a message to the people we entrust with the supervision of our children about the accountability that comes with that role. And it will send a message to parents who send their children to school in Cobb County about the consequences we will enforce when that trust is violated.”