ST. PAUL, Minn. (AP) -- A former City Council candidate in St. Paul, Minnesota, who pleaded guilty to posting a topless picture of his estranged wife to his campaign website has been sentenced to probation.

Judge Robert Awsumb on Friday placed 39-year-old David Martinez on probation for two years and ordered him to receive a mental health evaluation, avoid drugs and alcohol, and refrain from having contact with his wife. Martinez faces about a year in prison if he violates those terms.

Martinez was charged with non-consensual dissemination of private sexual images for violating the state's revenge porn law. The complaint says the incident happened last July during a race he eventually lost in a special election.

Court documents show Martinez posted the photo after his wife filed for a protection order against him.

More From AM 1240 WJON