AUGUSTA, Maine (AP) — A federal judge on Thursday declined to halt tabulations under Maine’s new voting system, putting the state on path to declaring a winner in the second of its two U.S. House races.

Republican U.S. Rep. Bruce Poliquin is challenging the constitutionality of Maine’s ranked-choice voting system used for the first time in congressional races in Maine.

U.S District Judge Lance Walker declined to intervene to stop the process. But the lawsuit remains alive because he didn’t rule on the constitutionality of the system.

The most expensive congressional race in state history pitted Democrat Jared Golden, a Marine Corps veteran, against Poliquin, the two-term incumbent. The judge’s decision cleared election officials to run the final numbers and declare a winner. An announcement is expected Thursday afternoon.

Poliquin plans to pursue his lawsuit, win or lose.

“If Congressman Poliquin prevails in the rank vote algorithm, we will still proceed with constitutional concerns,” said Brendan Conley, Poliquin’s spokesman.

The first round of voting on Election Day ended with Poliquin and Golden both collecting 46 percent of first-place votes, with Poliquin maintaining a slim edge of about 2,000 votes.

That would’ve meant a Poliquin victory under Maine’s old voting system. But neither candidate secured a majority, triggering additional voting rounds.

The new system adopted by Maine voters in 2016 lets people rank candidates from first to last on the ballot. It provides for additional tabulations in which last-place candidates are eliminated and votes reallocated to ensure the winner gets a majority of the vote.

Declaring himself the “fair and square winner,” Poliquin pointed out the voters in his 2nd Congressional District rejected the new voting system.

In his decision, the judge said it doesn’t appear the U.S. Constitution prohibits an election process with more than one round of ballot counting. He also said it’s plausible the Constitution allows states “sufficient leeway to experiment with the election process” similar to Maine’s reform.

“Moreover, for this court to change the rules of the election, after the votes have been cast, could well offend due process,” he wrote.

For now, the voting system is used only in federal races and in statewide primary elections in Maine. It cannot be used in the governor’s race or legislative races because of concerns it runs afoul of the state constitution.

Democratic Gov.-elect Janet Mills has vowed to seek to amend the Maine’s constitution so the system can be used in all elections.