DETROIT — Prosecutors want to keep a former state senator off the Detroit City Council general election ballot after he finished second in Tuesday’s primary despite serving a 10-month sentence for shooting at his ex-wife’s car.

A plea agreement called for Virgil Smith to quit the Senate and not seek elective office while on probation for five years, but a judge threw out those terms, saying he could not force Smith from the office. Smith eventually resigned.

The Wayne County Prosecutor’s Office asked the high court to review that decision Thursday and rule before the Aug. 22 deadline to certify candidates for the general election.

Smith completed his sentence for malicious destruction of property in December. The Michigan appeals court declined to review the trial judge’s decision in April.