After the Minnesota Republican Party waited until the last minute to get their party’s presidential nominee on the ballot, the state’s Democrats filed a legal challenge late Thursday arguing that the way Republicans placed Donald Trump on the ballot violated election rules.

In a lawsuit filed with the state Supreme Court, the Democratic-Farmer-Labor Party contends that Trump and his running mate, Indiana Gov. Mike Pence, should be pulled off the ballot.

Late last month, Minnesota residents who looked up a sample ballot online were stunned to find that Trump was nowhere to be found just two business days from the secretary of state’s deadline for major parties to get their tickets on the ballot. By the next day, state party officials were scrambling.

Under Minnesota state statutes, major parties need to supply the name of the party’s presidential and vice presidential nominees, the names of ten nominated electors and ten alternate electors in order to officially get their candidates on the ballot. As the Washington Post reported, the Minnesota GOP elected its electoral college members – the ones who actually cast the ballot – at its state convention in May, but forgot to elect alternate electors.

To rectify the problem, the state party held a last-minute meeting to select the alternates, a process the Democrats say violated election law. Minnesota’s secretary of state accepted the certification, and Trump was ultimately added to the ballot.

In its petition, the DFL writes that the state GOP’s alternate electors aren’t valid because the executive committee, rather than delegates at the convention, chose them. The petition notes that “the executive committee is obviously not a ‘delegate convention.’”

“It is incumbent upon political parties to follow the rules binding our elections and in this instance it does not appear that the Minnesota Republican Party did so,” DFL chair Ken Martin said in a statement about the filing.

The state GOP did not respond to local media requests for comment.

As the Pioneer Press notes, the Minnesota Supreme Court has a good record of resolving election matters quickly. Early in-person voting in the state begins on Sept. 23.

Read the full complaint below: