This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

KANSAS CITY, Mo. — After a judge’s ruling, the primary election for the Jackson County Sheriff’s seat has been invalidated.

The judge’s ruling, issued Tuesday, means the county’s Democratic and Republican parties will select a candidate to run on the November ballot.

When voters head to the polls next week for the primary election, the candidates who filed for the sheriff’s race will still be listed on ballots, but the votes for that seat will not count.

Whomever wins the November election will then complete the remainder of former sheriff Mike Sharp’s term, which expires in 2020.

The ruling was the result of a petition filed by the Jackson County Democratic Committee, arguing that Jackson County and Clerk Mary Spino “lacked legal authority to open or re-open a candidate filing period and/or call a primary election.”

In November 2016, Sharp was elected to a four-year term as sheriff. Therefore, the seat was not scheduled for a primary or general election in 2018.

When Sharp resigned in April, Spino and Jackson County called for a primary election on Aug. 7, including a five-day period for candidates to file for the position The county argues it followed the proper procedure to fill the vacant seat.

The judge ruled, however, that procedure was “misguided and legally incorrect.” Under Missouri law, the county can re-open a filing period if a candidate in a regularly scheduled election dies, withdraws or is disqualified.

But the judge said that wasn’t the case in this instance because there was no election already scheduled and therefore no filing period to reopen.

“Spino and Jackson County did not have the statutory authority to open or reopen a five-day candidate filing period nor did they have the statutory authority to call a primary election for sheriff,” the judge’s ruling says.

The ruling goes on to state that when Sharp resigned, County Executive Frank White should have appointed a person from the same political party to fill the position until the next general election.

Jackson County released the following statement on the judge’s ruling:

“The Clerk of the Legislature, who serves as the election authority for candidate filing and calling county elections, asked for the assistance of the County Counselor’s Office in providing a legal opinion regarding the procedure to elect a sheriff to fill the remainder of the sheriff’s unexpired term, starting January 1, 2019. The County Counselor’s Office acknowledged a lack of clarity in the law on this point, but reviewed that law and prior precedent, and determined that the best way to proceed was to open candidate filings for a primary election. However, that determination was taken to court and the court has decided differently. The County will follow the court’s order.”