Democrat Mark Begich conceded the Alaska governor’s race Wednesday to Republican Mike Dunleavy, the Associated Press reported, bringing an abrupt end to a campaign filled with mysterious twists.

As of Wednesday afternoon, Begich trailed Dunleavy by more than 20,000 votes with 98 percent of precincts reporting.

Until three weeks ago, the governor’s race had been a three-way contest between Begich, Dunleavy and incumbent Gov. Bill Walker (I).

In mid-October, however, Walker announced that his running mate, then-Lt. Gov. Byron Mallott, was resigning from office immediately because he had made “inappropriate comments.”

Neither Walker nor his office elaborated on what those comments were.

“Byron recently made inappropriate comments that do not reflect the sterling level of behavior required in his role as Lieutenant Governor,” Walker said in a statement at the time.

The statement included remarks from incoming Lt. Gov. Valerie Nurr’araaluk Davidson that hinted that the inappropriate comment had been about women.

“Alaskans deserve the highest standards of conduct by their elected officials. While I am deeply saddened by the resignation of Lt. Governor Byron Mallott, I am profoundly disappointed by his conduct,” Davidson stated. “Respect for women, and the dignity of all Alaskans, is our responsibility.”

Days after Mallott’s resignation, Walker abruptly ended his campaign, citing his dwindling chances of winning the three-way race.

“When I said I ran for governor to do the job, not make the decisions to keep the job, I meant exactly what I said,” Walker said in an Oct. 20 statement. “Absentee ballots have already been mailed, and Alaskans are already voting. In the time remaining, I believe we cannot win a three-way race.”

On his way out, Walker endorsed Begich, in the hopes of keeping the governorship out of Dunleavy’s hands.

It may have been too little too late. As of Wednesday afternoon, Walker had received about 2 percent of the vote. Dunleavy was leading Begich by 52.5 percent to 43.7 percent when Begich conceded the race.

Begich is a former U.S. senator and mayor of Anchorage. Dunleavy is a former Alaska state senator who resigned from his seat in January to enter the governor’s race.