A man who prosecutors say admitted while applying for a Missouri State Highway Patrol job that he had had sexual contact with several underage girls was sentenced Thursday to 20 years in prison.

Cedric Lovejoy, 29, of Plato, was undergoing a polygraph test in November 2012 when he was asked if he had ever committed any criminal offense. He responded that he had "engaged in sexual acts with three minor females and recorded the acts on several different occasions," according to court documents.

Three weeks later, the patrol served a search warrant on Lovejoy's home and found video footage recorded in July 2009 of a 14-year-old performing a sex act on him. Lovejoy was 23 at the time the video was recorded.

Initially charged with two counts of sexually exploiting a child, he pleaded guilty last December to one count of sexual exploitation as part of a plea deal with prosecutors.

In April, however, his federal public defender withdrew from his case at Lovejoy's request, and his new attorney filed a motion in July to withdraw the plea. Lovejoy argued that he had been pressured to plead guilty by his previous counsel and that he hadn't fully understood the consequences of his plea.

Prosecutors noted that Lovejoy had assured the judge in December that he had discussed the plea with his lawyer and understood what he was doing. The deal he signed clearly stated that the minimum sentence for the crime was 15 years in prison.

In Springfield on Thursday, U.S. District Judge M. Douglas Harpool rejected his motion to withdraw the plea. In addition to the 20 years, Lovejoy will spend the rest of his life on supervised release after his prison term ends.