ST. PAUL, Minn. — Minnesota’s Supreme Court on Monday dismissed a legal challenge by Democrats seeking to have Donald Trump removed from the ballot.

The state Democratic party argued that Republicans erred in how they sent in Trump’s name for a spot on the ballot. While state law requires political parties to select electors — the people who cast Electoral College ballots following the popular vote — and their alternates at conventions as part of putting a nominee on the ballot, Democrats said the state GOP failed to properly select those alternates.

That lawsuit was filed late Thursday. With early voting set to begin Sept. 23 and some ballots already printed, the Supreme Court said Democrats waited too long to file the legal challenge. The GOP submitted Trump for placement on the ballot on Aug. 25.

Keith Downey, chairman of the Republican Party of Minnesota, celebrated the court’s ruling. He had called the lawsuit frivolous and accused Democrats of trying to unfairly strip Trump and running mate Mike Pence from the ballot.

“We are pleased the Court struck down this blatant Democrat attempt to rig the Minnesota election for Hillary Clinton and disenfranchise Minnesota voters,” Downey said in a statement.

Downey previously acknowledged that the party forgot to vote for alternates at its convention in May, but he insisted Trump was placed on the ballot correctly.

Ken Martin, chairman of Minnesota’s Democratic-Farmer-Labor party, said he respected the court’s decision and the tight electoral timelines in a statement but said Republicans should have to “follow the rules.”