A Casper man who threatened to post a girl's topless photo on Facebook unless she had sex with him was arrested earlier this week.

During his initial appearance in Natrona County Circuit Court on Tuesday, Nathan James Porter, 25, heard the charges of blackmail and coercing a child for sex.

Circuit Court Judge Steven Brown set his bond at $20,000 and ordered him to have no contact with the alleged victim. He will have a preliminary hearing within a few weeks to determine whether his case should be bound over to state district court for trial.

If convicted, he faces up to 10 years imprisonment on the blackmail count, and not less than five years to not more than 12 years on the coercion count.

According to an affidavit filed with circuit court, officers met with a girl and her parents after receiving a report a man was trying to extort money from her.

The girl had been texting with Porter and at one point sent him a topless photo. Porter responded that he would pay $50 to have sex with her or a friend of hers.

If she didn't comply, he would post the photo on Facebook. That's when she contacted law enforcement.

On Monday, officers contacted Porter and set up a meeting.

One officer posed as the girl and told Porter she would meet him at an address on South Poplar Street. The officer went into the women's bathroom and texted Porter, who responded he was in the men's bathroom. He asked her to have sex in the men's room.

Officers then arrested him.

After being read his rights, Porter confessed to receiving messages and the photo from the girl, that he would pay her for sex, and would post the photo on Facebook if she refused.