PHILADELPHIA (CBS/AP) — The only thing stopping Pennsylvania counties receiving and sending ballots to registered voters who applied for one is the resolution to a State Supreme Court case removing the Green Party’s candidate from the ballot. The Green Party’s candidate for president did not strictly follow procedures for getting on Pennsylvania’s ballot in the November election and cannot appear on it, the state Supreme Court ruled Thursday, delivering a win for Democrats as Joe Biden tries to capture the battleground state’s electoral votes.

The court, with a 5-2 Democratic majority, reversed the ruling by a Republican judge in a lower court on the candidacy of Green Party presidential candidate Howie Hawkins.

Democrats have long gone to court to keep Green Party candidates off the ballot, worried that they will siphon otherwise liberal voters in close contests against Republicans in the politically divided state.

In this case, Democrats targeted what they said were disqualifying irregularities in how Green Party candidates for president and vice president filed affidavits that accompany paperwork to get on the ballot.

The resolution of the case is the last thing holding up counties from getting ballots printed and mailed to registered voters who have applied for one.

Losing Pennsylvania could prove fatal to Biden’s chances of defeating President Donald Trump. No Democrat has won the presidency without winning Pennsylvania since Harry S. Truman in 1948.

In 2016, Trump beat Democrat Hillary Clinton by 44,292 votes in Pennsylvania, providing a crucial stepping stone to the White House. The Green Party’s nominee that year, Jill Stein, drew slightly more votes than that, 49,941.

Pennsylvania Supreme Court also sided with Democrats, extending mail-in ballot deadlines to three days after Election Day.

The Associated Press contributed to this report.