The Maine Supreme Court greenlighted ranked-choice voting for the upcoming presidential election-- becoming the first state in the nation to do so -- and overriding efforts by Republicans to block the implementation of the system they say prevents voters' rights from being heard.

The system allows voters to rank all of the candidates on the ballot. If no one wins a majority of first-place votes, then the ballots are re-tabulated by computer to eliminate the underdogs and reallocate votes based on those supporters’ second-place choices.

PHILADELPHIA ELECTION OFFICIAL URGES GOP STATE LEGISLATURE TO OUTLAW SECRECY ENVELOPES FOR MAIL-IN BALLOTS

The state GOP attempted to petition registered voters to support a referendum to reject ranked-choice voting, but the Supreme Judicial Court ruled Tuesday it had not met the minimum threshold necessary to so.

The secretary of state had previously rejected the referendum, ruling the GOP fell short of the needed level of 67,067 signatures of registered voters to force the issue. The Maine GOP had appealed that decision and a lower court judge sided with Republicans, reinstating enough signatures to surpass the minimum by 22 signatures.

Further legalities surrounding whether petition circulators needed to be registered in the region at the time the initiative began was the focus of the Supreme Court's decision.

The courts ruled unanimously that the requirements don’t violate First Amendment rights of signature gatherers. That conclusion invalidated 988 signatures, delivering a defeat to the GOP.

The decision brought relief to state officials who had already begun printing grid-style ballots for a ranked election in an effort to meet federal deadlines on absentee ballots.

“As we have already printed the ballots, due to the federal deadlines we must meet to provide ballots for overseas and military voters, this decision comes as a great relief and avoids the complications, confusion, and expense that would have arisen from reprinting and reissuing ballots,” Secretary of State Matthew Dunlap said.

The presidential ballot in Maine will include Trump, Democratic challenger Joe Biden, and three other candidates.

Other, less popular candidates, include Howie Hawkins of the Green Party, Jo Jorgensen of the Libertarian Party, and Rocky de la Fuente of the Alliance Party.

Ranked voting will also be used in U.S. House races and the closely watched U.S. Senate race between Republican incumbent Susan Collins and Democrat Sara Gideon, the Maine House speaker.

Ranked-choice voting has been a point of contention between Democrats and Republicans and further complicates a tricky voter system in Maine, which is already one of two states that divides electoral votes.

CLICK HERE FOR THE FOX NEWS APP

The complex electoral system highlighted divides within congressional districts throughout the state, as evidenced after Democrat Hillary Clinton won three electoral votes in the swing 2nd Congressional District in 2016 while Trump won one electoral vote.

Advocates of the ranked system say it prevents "spoiler candidates"-- or someone who is unlikely to win but whose presence on the ballot nonetheless will affect the outcome of the election-- from throwing the election.

The Associated Press contributed to this report.