WETUMPKA -- A 21-year-old man, who told Montgomery police during a job interview that he possessed child pornography and had sex with an underage girl, has been sentenced to 30 years in prison.

Circuit Judge Ben Fuller sentenced Max D. Hinton of Deatsville on Monday after his conviction of second-degree rape, sodomy , enticing a child for immoral purposes and producing and possessing child pornography.The girl testified the two had consensual sex when she was 15 and he was 17. But a person younger than 16 in Alabama can't legally consent to have sex, and the judge voiced outrage over the child pornography involving girls as young as 6.

There was no explanation why Hinton mentioned the pornography in his job interview, which prompted an investigation and his arrest.