A Saudi man was sentenced to two and a half years in jail after admitting to extorting a Danvers girl into performing online sexual acts by threatening to release naked pictures of her.

Abdulrahim Altalhi was sentenced in Salem Superior Court on Wednesday after pleading guilty to charges of disseminating child pornography, posing a child in the nude, child enticement and electronic child enticement, the Salem News reported. 

RELATED: Secret Service officer indicted for allegedly sexting with minor

Altalhi was convicted of posing as a teen girl in order to coerce the victim into sending him explicit photos that he, in turn, sent to her family when she refused to meet his demands, WCVB stated in a related article.

Over a span of three months, Altalhi, then a student in Indiana, used the social media app Kik to demand that the teenage girl do his homework, engage in online sexual activity and place a posting on Craigslist advertising sexual services, the Salem News added.

A lawyer for Altalhi said his client's actions were due to a "cultural divide," according to WCVB.

Danvers police Detective Robert Sullivan was able to identify Altalhi after subpoenaing Internet records, the Salem News stated. Altalhi was then arrested last September when he was returning to college from a summer in Saudi Arabia.

RELATED: Hackers team up in Boston to fight human trafficking

Salem Superior Court Judge James Lang acknowledged that, after Altalhi completes his jail term, he will likely face deportation rather than serve his three-year probation sentence, the Salem News added.