A Kansas City man must serve 18 years in prison after admitting to threatening to post nude photos of a 16-year-old girl he met online if she wouldn't have sex with him.

The Kansas City Star reports 23-year-old Denis Aguilar pleaded guilty in February to attempted child enticement and attempted statutory sodomy.

Platte County prosecutors say the girl and Aguilar met on a social network website and repeatedly asked her to send him nude photos. She told investigators that she sent him a photo thinking he would stop and then stopped communicating with him. Aguilar became angry when she wouldn't respond.

Prosecutors say Aguilar threatened to post the photo if she didn't send more, and then threatened he would post them if she didn't have sex with him.

Medioimages/Photodisc, ThinkStock