ANCHORAGE, Alaska — The voting process during the House District 40 primary election was so fraught with error that the only remedy to save the election is to throw out the bad ballots and recount the votes, a lawyer for an incumbent state representative who lost his race by eight votes argued Tuesday.

“If that is impossible because of the misconduct has risen to the level that it makes it impossible to ascertain the outcome of the election, we would request that the court order that a new election be held,” attorney Timothy McKeever said in opening statements in the trial for the lawsuit brought by state Rep. Benjamin Nageak.

Nageak, of Barrow, lost the race to challenger Dean Westlake by eight votes after a recount was conducted. Nageak is a Democrat but caucuses with the House’s Republican-led majority. Former state GOP chairman Randy Ruedrich was sitting at the plaintiff’s table.

The state Democratic Party supported Westlake’s candidacy.

The most contentious issue in the primary election was that all 50 voters in the village of Shungnak received both the Republican ballot and the ballot for other parties, including Democrats. State law dictates that a voter only gets one ballot.

However, the Democratic Party has an open system, meaning any voter regardless of party can cast a ballot in the Democratic primary, while Republicans have a closed primary.

There were no Republicans running for the District 40 seat, only the two Democrats. Because the Democrats have an open primary, the state’s lead attorney said everyone who voted in Shugnak did so properly.

“It was an honest mistake,” state attorney Margaret Paton-Walsh said of voters receiving both ballots. She said it does not amount to malconduct, and counting those ballots “did not produce a single vote in the Democratic primary that was cast by a voter who was not eligible to vote in the Democratic primary.”

McKeever said there were other voting irregularities, such as seven voters in Kivalina who were allowed to vote both ballots but were required to cast questioned ballots. The seven ballots were not counted after the election, but they were tallied during the recount. There were also claims of a voter in Bettles being identified as a Republican by a poll worker and given that party’s ballot.

There were allegations of problems with special-needs ballots in Buckland, misplaced absentee ballots in Nome during the review board process, not having enough poll workers at some precincts and paperwork errors.

Paton-Walsh said most of the allegations made by the plaintiffs were “simply their failure to understand the process by which elections are conducted, allegations which are not simply true or things that did not factor” in the outcome of the election.

She noted the state of Alaska has a high threshold to challenge the outcome of an election.

“The only real error that occurred, that some voters received both the Republican and combined party ballot, does not meet the standard for a successful election contest,” she said.

Anchorage Superior Court Judge Andrew Guidi is hearing the case without a jury. He told both sides that he expects closing arguments either late next Monday or Tuesday morning.

Attorneys expect a ruling by Oct. 7, and that could be appealed to the Alaska Supreme Court.

Absentee in-person voting for the general election begins Oct. 24, and the state would like to have the ballots prepared a week before that date.