A Ramsey County District judge erred in ruling that the prostitution conviction of a Michigan man could be dismissed upon his successful completion of probation, the Minnesota Court of Appeals decided Monday.

The Appeals Court reversed Judge Gregg Johnson's decision and sent the case back to District Court. The defendant, Jeffrey B. Martin, 38, filed a motion to withdraw his guilty plea because of the prosecution's appeal of Johnson's sentencing order.

Martin was charged last year in an undercover police sting, and pleaded guilty in August to one count of misdemeanor engaging in prostitution. Martin was sentenced to one day in the county jail, for which he was given credit from his initial arrest, and a year of probation. He also was required to complete programming by Breaking Free, which fights sex-trafficking and sexual exploitation, and to pay $1,081 in fees.

Johnson also ruled that Martin's conviction could be dismissed if he completed probation and remained law-abiding for two years despite objections from the St. Paul city attorney's office, which prosecuted the case and appealed the judge's sentence.

The prosecution's argument is supported by case law, said the appellate court. The judge's sentencing order falls under case law that applies to "a stay of adjudication," and a judge can't stay adjudication unless the prosecutor agrees or has "committed a clear abuse of discretion," the decision said.

"Regardless of whether the District Court received Martin's guilty plea, the District Court's provision for the vacatur of the plea and the dismissal of the charge means that the state likely will have nothing to show for its prosecution after two years," the decision said. "The District Court's order is inconsistent with the Legislature's intent that, absent an agreement of the parties, a district court 'may not refuse to adjudicate the guilt of a defendant who tenders a guilty plea.'"

Twitter: @ChaoStrib