TWIN FALLS, Idaho (AP) — A south-central Idaho man who posed online as a woman asking to be raped in her home in a ploy that resulted in the woman fending off two rape attempts by men who broke into her home has been sentenced to 10 years in prison.

The Times-News reports in a story on Wednesday that Justin Crawford of Twin Falls received the sentence Friday in 5th District Court after pleading guilty to solicitation of rape.

A judge ordered Crawford placed in a retained jurisdiction program in the Idaho Department of Correction.

At the end of the program, the judge will decide if Crawford can be placed on probation or start serving the 10-year sentence.

Crawford's attorney says Crawford suffers from post-traumatic stress after serving in Iraq.