Maine Attorney General Janet Mills and legislative Republicans told the state’s high court on Friday that the ranked-choice voting system approved by voters in 2016 is unconstitutional, setting up a fight with advocates for the law.

Legal briefs were due to the Maine Supreme Judicial Court on Friday ahead of an April oral argument in a proceeding initiated last month by the Maine Senate asking for an advisory opinion on the new law’s constitutionality.

The system would apply in gubernatorial, congressional and legislative races with three or more candidates. A winner would be declared if a majority picks a candidate as their first choice, but if that doesn’t happen, the candidate with the lowest share of first-place votes is eliminated and second-place votes for that candidate are reallocated. That process that would be repeated until a majority is won.

But Mills, a Democrat, has long said that it runs afoul of two provisions in the Maine Constitution that say elections are decided by a plurality of votes and that ballots must be received, sorted and counted by cities and towns.

The ranked-choice campaign was an effort to end plurality elections that have decided nine out of the last 11 gubernatorial races, including Gov. Paul LePage’s wins in 2010 and 2014. It would require the Maine secretary of state’s office to tabulate ranked-choice votes.

Mills’ brief to the high court doubles down on that argument, saying the state Constitution “must be amended before such fundamental changes in Maine’s electoral process can occur.”

She’s joined in that belief in briefs from Secretary of State Matthew Dunlap, a Democrat, the Republican-controlled Senate and a joint brief from Republicans in the House of Representatives and the conservative Maine Heritage Policy Center.

The brief from the Committee for Ranked Choice Voting, which ran the $2 million campaign to pass the law, argues that the system doesn’t conflict with those constitutional provisions.

“Nothing in the Act prevents municipal officials from sorting, counting, declaring and recording the ranked choice votes prior to the final determination of the candidate with the most votes,” it writes.

Advocacy groups agreed on that in briefs, including filings by FairVote, the League of Women Voters and Maine Citizens for Clean Elections, along with University of Maine Law School professor Dmitry Bam and Portland lawyer and author Marshall Tinkle.

Those parties also oppose Mills, Dunlap and Republicans in arguing that the consitutionality question doesn’t rise to a “solemn occasion” under Maine law, the constitutional provision that allows the governor or legislative chambers to ask the high court for advisory opinions. The pro-referendum advocacy groups and lawyers were joined in that sentiment in a brief from eight Senate Democrats led by Minority Leader Troy Jackson of Allagash.

This advisory opinion also won’t be the last word. If the high court finds the law constitutional, the Legislature will be under pressure to implement it. If the court finds it unconstitutional, lawmakers will be under pressure to initiate a constitutional amendment designed to conform to voters’ will.

Either way, political stakes are high ahead of the 2018 gubernatorial election. Independent Eliot Cutler likely would have beaten LePage in 2010, according to a Bangor Daily News simulation. Republicans would like to preserve the system that allowed that outcome, while advocates want it scrapped by next year.