LOUISVILLE, Ky. (AP) - A former teacher and assistant coach in Kentucky has been sentenced to six years in prison for violating child exploitation laws.

The U.S. attorney's office in Louisville said 40-year-old Matthew Graves was also ordered to spend 20 years on supervised release. Graves pleaded guilty to two counts of a federal indictment in September. He was sentenced last week.

RELATED: Former KCD teacher enters guilty plea on child porn charges

Prosecutors said the plea agreement said Graves used a social media messaging application in 2014 to send and receive images of minors engaged in sexually explicit conduct.

A news release from the U.S. attorney's office said Graves was a physical education teacher and assistant coach with Kentucky Country Day's athletic department in Louisville.

RELATED: New details in child porn distribution case involving former KCD coach

Graves was arrested by federal authorities on March 21, 2016.