MARYVILLE, Mo. (AP) - -

A Missouri man accused of sexually assaulting a 14-year-old schoolmate when he was 17 has pleaded guilty to a misdemeanor child endangerment charge as part of a deal with prosecutors.

Matt Barnett entered the plea Thursday during a court hearing in his hometown of Maryville. He was sentenced to two years of probation and a four-month suspended jail term.

The girl says Barnett raped her at a house party in January 2012. Barnett says the sex was consensual.

The local prosecutor dropped the case because he said the girl's family stopped cooperating.

A special prosecutor was tasked with re-examining it after it received widespread attention last fall.