BANGOR — A federal judge said Wednesday morning he hopes to rule by Thursday whether to stop the vote count in Maine’s 2nd District congressional race.

During a 140-minute hearing, U.S. District Court Judge Lance Walker heard arguments from attorneys on both sides of a request by U.S. Rep. Bruce Poliquin to shut down the ranked-choice vote count underway in Augusta.

Meanwhile, Maine’s secretary of state announced late Wednesday afternoon that staff in his office would finish scanning and processing voter ballots in the race on Thursday morning.

Poliquin, who is locked in a tight race with Democrat Jared Golden, has asked the court to issue a restraining order to block the count or at least prevent the secretary of state from figuring out the ranked-choice portion of the tally.

He is also asking the court to decide whether ranked-choice voting is constitutional, an issue that will likely take weeks to argue and even longer to decide.

What all the legal drama means is that the election could be up in the air for a long while if Walker figures there’s any substance to Poliquin’s claims. Golden’s attorneys insisted the lawmaker’s case has no merit.

In the meantime, Secretary of State Matthew Dunlap has been plowing ahead with the count, drawing ever closer to having all of the approximately 280,000 ballots cast in the race last week scanned into a computer. Also in the race were independents Tiffany Bond and Will Hoar.

Once there, Dunlap will make a quick tabulation of all first-round votes and then a final count after redistributing to Poliquin or Golden the second- and third-place votes they received from the ballots cast for Bond and Hoar under the ranked-choice system.

Dunlap said Wednesday afternoon the count would wrap up Thursday morning and the ranked-choice tabulation would then take place.

Poliquin has already declared himself the victor citing unofficial first-round balloting showing him with as much as a 2,000-vote lead — a margin so close that a recount may be in the future as well.

There are a few firm deadlines ahead.

On Nov. 26, the law requires Dunlap to certify the state’s election results. Gov. Paul LePage is required to certify those numbers by Dec. 14 so they can be delivered on time to the U.S. House clerk.

The newly elected House members take office on Jan. 3. The House, which will be controlled by Democrats, has the power to decide who is eligible to be seated. So if there’s an ongoing dispute, the House may take sides about which Maine contender is allowed to serve.

None of the four candidates in the race appeared in Walker’s courtroom Wednesday morning, though lawyers for three of them showed up.

Poliquin said on Facebook Wednesday that continuing the ranked-choice count would give “multiple votes” to those who ranked the contenders and picked one of the two independents as their first choice.

Their subsequent votes, he said, “should not matter” no matter whether they sided with him or Golden.

“The process is flawed, creates tremendous confusion, and is proving to be a recipe for disaster,” the two-term incumbent said. He pointed out that while Maine voters as a whole endorsed ranked-choice voting twice, his 2nd District voted against implementing it in both 2016 and again in June.

Whatever the outcome in Poliquin’s district, ranked-choice voting is the system used for this year’s congressional race.

Peter Brann, a Lewiston attorney for Golden, told Walker that Poliquin waited too long to challenge the law. “It’s too little, too late,” he said.

Poliquin’s attorney, Washington election law expert Lee Goodman, said the congressman couldn’t sue sooner because he would not have had standing to bring the case since it was purely hypothetical until votes were cast

He said now that the voting is done, Poliquin has a clear interest in preserving what he said is the traditional, constitutional requirement that whoever wins a plurality of the vote should head to Capitol Hill.

Goodman argued that with a narrow lead in the preliminary first-round count, Poliquin has a responsibility of fending off a voting “scheme” that he insisted gave extra clout to some voters at the expense of others.

Assistant Attorney General Phyllis Gardiner, who represents the secretary of state said that hitting the brakes on the ballot count would undermine the election’s integrity and wind up costing more.

Brann said Poliquin has suffered no harm from the new system so there’s no need to stop a count that the Republican might ultimately win. Most insiders expect that Golden will collect enough of the second choices of independent voters to emerge as the victory.

According to legal experts, legal challenges to ranked-choice-like systems in other states have not faired well. 

[email protected]

Maine Secretary of State’s office workers open boxes and sort ballots at 9:07 a.m. Wednesday as the ranked-choice voting tally for Maine’s 2nd Congressional District continued in the Elkins Building in Augusta. (Joe Phelan/Kennebec Journal)

An election observer uses a smartphone to record video of Secretary of State workers sorting ballots Wednesday morning as the ranked-choice vote counting for Maine’s 2nd Congressional District continued in the Elkins Building in Augusta. (Joe Phelan/Kennebec Journal)

Secretary of State workers, top left, sort ballots as observers watch from outside the secure area Wednesday morning as the ranked-choice voting tally for Maine’s 2nd Congressional District continued in the Elkins Building in Augusta. (Joe Phelan/Kennebec Journal)

A Maine Secretary of State office worker cuts a wire band on ballot box Wednesday morning as the ranked-choice voting tally for Maine’s 2nd Congressional District continued in the Elkins Building in Augusta. (Joe Phelan/Kennebec Journal)

Secretary of State workers wheel a cart of ballot boxes out of the storage room Wednesday morning as the ranked-choice voting tally for Maine’s 2nd Congressional District continued in the Elkins Building in Augusta. (Joe Phelan/Kennebec Journal)

Lee Goodman, attorney representing U.S. Rep. Bruce Poliquin, enters the Federal Court House in Bangor on Wednesday morning to stop ranked-choice ballot counting in Maine’s 2nd Congressional District race. (Michael G. Seamans/Morning Sentinel)