Editor's note: This story has been updated. Click here for our most up-to-date coverage.
The president of the Alaska Senate, Fairbanks Republican Pete Kelly, was holding on to a razor-thin margin against a Democratic state representative Tuesday night in a hard-fought race that put the direction of the Senate on the line.
With all precincts reporting Tuesday night, Kelly was leading Rep. Scott Kawasaki by just 11 votes.
The votes counted Tuesday night do not include absentee and questioned ballots, and the number of ballots left to be tallied vary by district.
If Kelly loses, it will trigger a leadership change and even possibly further reorganization within the 20-member Senate.
Meanwhile, in a key race in the Alaska House of Representatives, incumbent Rep. Paul Seaton of Homer appeared to be headed for a convincing defeat. Seaton's opponent, Republican Sarah Vance, had 59 percent of the vote to Seaton's 40 percent with all of Homer precincts reporting.
Seaton was a longtime Republican but decided to caucus with House Democrats in 2016. He ran as a nonpartisan for the first time this year.
Republicans were in position to flip other seats to regain control of the House.
In the race for Kawasaki's former seat in Fairbanks, House District 1, Republican Bart LeBon held a 79-vote lead over Democrat Kathryn Dodge with all precincts reporting Tuesday night.
Incumbent Rep. Jason Grenn, an independent, was in trouble Tuesday night. Republican Sara Rasmussen was leading Grenn by 8 percentage points, with close to over half of precincts reporting.
Rasmussen, who campaigned heavily on an anti-crime and anti-Senate Bill 91 platform, said in an interview Tuesday night that voters had thought Grenn would be a more conservative representative.
But Republican Gabrielle LeDoux, who joined Seaton and Grenn in caucusing with Democrats in 2016, was on track to keep her seat. She beat back a Democrat and three write-in candidates, including Jake Sloan, a Republican who got an enthusiastic push from the Alaska Republican Party, which is no fan of LeDoux's.
LeDoux's win would come despite a primary victory that was overshadowed by allegations of voter fraud. LeDoux has said she's done nothing wrong.
Meanwhile, in a tight race in East Anchorage, incumbent Republican Rep. Lance Pruitt was up by 160 votes against Democratic challenger Liz Snyder in House District 27, with seven out of eight precincts reporting.
It was still too early to call other key races Tuesday night.