A heavily Republican-leaning state could have outsized influence on the balance of power in Washington depending on the results of the upcoming Nov. 5 elections, with control of the White House and Congress on the line.

Nebraska may determine which party controls the White House and Senate depending on how other races across the country and the Electoral College end up breaking down, a unique quirk in what has been an election cycle filled with unprecedented events.

After a last-minute effort to change the state’s unique allocation of Electoral College votes to winner-take-all from its current system, which casts them by congressional district, Nebraska’s Second Congressional District could tip the scales in either direction.

The district is one of the most competitive in the country and has been won by the Democratic presidential nominee in the last two cycles. Allies of former President Donald Trump sought to convince the state’s legislature to change its allocation system last month, but the state’s Republicans were unable to secure enough support to overcome a filibuster.

As a result, the 2nd District is in play for both presidential campaigns in a historically close race that could end up as one of the closest in U.S. history.

“The very fact that there was a serious attempt made along those lines this late in the electoral cycle suggests at least to me that on the Republican side, there were some significant concerns about it,” said Kevin Smith, a political science professor at the University of Nebraska-Lincoln. “There’s an electoral vote there that the Democrats have a realistic shot at winning.”

In a scenario where Trump wins all five of the state’s votes by carrying each district, the Electoral College could result in a 269-269 tie, depending on how the rest of the country votes. If Trump wins the 2nd District, winning the so-called “blue wall” of Wisconsin, Michigan and Pennsylvania would not be enough for Harris to reach the 270-threshold needed to win the White House, meaning she would have to win another battleground.

The state also has a surprisingly competitive Senate race, which could make it more difficult for Republicans to win back the majority in a cycle that forecasters see as heavily favoring the party. West Virginia Sen. Joe Manchin’s retirement has essentially guaranteed Republicans one flip, meaning they only need to flip one more seat, with two Democrats facing tough reelection bids in Republican-leaning states, Ohio and Montana, and several Democratic incumbents up for reelection in presidential battlegrounds.

But Nebraska’s Senate election could provide an unexpected buffer for Democrats’ margins.

Dan Osborn, who is running as an independent, is in a surprisingly tight race in a deeply Republican-leaning state against two-term incumbent Sen. Deb Fischer.

Osborn, a political newcomer, has rolled out a populist agenda to appeal to working-class voters and vowed to work for Nebraskans, attacking Fischer as an establishment lawmaker beholden to corporate interests. He has pointed to her seeking a third term after promising to serve only two as an indication that she has become part of the political establishment instead of working for voters.

Fischer has frequently claimed Osborn is a Democrat posing as an independent, releasing ads describing him as a “Bernie Bro” aligned with liberal Vermont Sen. Bernie Sanders, and being too inexperienced to serve the state well.

Polling on the race has been limited, but results released recently have shown it is within single digits, a surprisingly tight race given the state’s political makeup. An Independent Center poll from last week showed Osborn ahead of Fischer 47-42 among likely voters in the state. A poll commissioned by Osborn’s campaign last month showed him with a one-point advantage over Fischer.

According to polling analytics website FiveThirtyEight’s tracker of polling averages, Osborn trails by less than 1%, making it one of the closest Senate races in the country.

The close race has surprised most observers of the state’s politics. Fischer’s legislative and voting records include numerous conservative priorities, and she has the endorsement of Trump, who won the state by 20% in the 2020 election. A Democrat has not won a statewide election in Nebraska since 2012, and Republicans outnumber Democrats by nearly double, which has generally led to GOP dominance on Election Day.

But the state also has many voters who are registered as nonpartisan, and the Democratic Party did not nominate a Senate candidate this year, creating a unique opportunity for an independent like Osborn.

“If the polls are correct, what it suggests is there’s quite a few Republicans in the state of Nebraska, who are effectively saying, ‘I’m not going to vote for a Democrat, but if you give me a true independent, I’ll take a look and maybe give them a shot,’ ” Smith said. “That’s the only way the polls make sense to me.”