A former middle school principal in the Burnsville-Eagan-Savage district will serve 30 days in the workhouse in connection to his felony conviction of attempting to solicit a minor for prostitution.

Mohamed Ali Selim, 38 of Lakeville, was sentenced Friday by Hennepin County District Judge Julie Allyn following his September guilty plea. He was charged in May after he responded to an ad for prostitution with a presumed 15-year-old, who was actually an undercover police officer. Selim was arrested when he went to a location in St. Louis Park to meet the minor.

Allyn ordered Selim to serve 30 days in the county workhouse plus a 30-day sentence followed by three years of probation. He was also ordered to pay a $1,000 assessment and must undergo a psychosexual evaluation.

Selim is represented by Bloomington criminal defense attorney Eric Olson, who did not respond to requests for comment.

A school district spokesman declined to comment on Selim's sentencing since he is no longer an employee. He served as the principal at Eagle Ridge Middle School in Savage.

The district spokesman previously told the Star Tribune that there was no indication district students were involved. In an email to families, Superintendent Theresa Battle said "it will be difficult for all of us to process this."

The Hennepin County Attorney's Office said that Selim responded to the ad and then had a text message conversation with a presumed 15-year-old. In recorded phone conversations, Selim was told the minor was 15. Although he said her age made him nervous, he said he could meet her to "spend some time together," the office said.

Selim was previously the principal at William Byrne Elementary School in Burnsville. Associate Principal Bill Heim replaced him at Eagle Ridge following the case against Selim.