Kansans, who voted for Donald Trump by a margin of nearly 20 percentage points in 2016, could be on the verge of electing Democrats to the governor’s mansion and two of the state’s four congressional seats.

Kansas Secretary of State Kris Kobach, a die-hard conservative known for his provocative Trump-style politics, is locked in a virtual tie with Laura Kelly, a Democratic state senator. Despite Kansas’ reputation as a deep-red state, political observers say the close race is unsurprising, noting negative views of the controversial Kobach and the unpopularity of Republican Sam Brownback, who resigned as governor in January. The state also has a history of electing Democratic governors, the latest being Kathleen Sebelius, who led the state from 2003 until 2009.

Polls predicted a tight race between Kobach and Kelly even before he narrowly won the Republican gubernatorial primary. Those polls have stayed remarkably consistent throughout the campaign for the general election, even though the president, Vice President Mike Pence and Donald Trump Jr. have traveled to the state to support Kobach.

Meanwhile, Democrats Sharice Davids and Paul Davis have solid chances to win the state’s 3rd and 2nd Congressional Districts, respectively. In the 3rd, which includes Kansas City and upper-middle-class suburbs, Davids is thought to have an edge on GOP Rep. Kevin Yoder. Davis, who narrowly lost the gubernatorial race to Brownback in 2014, is battling veteran and business owner Steve Watkins in the 2nd, which includes most of eastern Kansas, including Topeka and a swath of rural areas.

Bob Beatty, a political science professor at Washburn University in Topeka, said that polling showed the closest governor’s race in modern Kansas history. He said the tight contest was shaped by strong Kelly fundraising, negative views of Kobach and the lingering unpopularity of Brownback, who was one of the least popular governors in the country when he left office to become the U.S. ambassador-at-large for international religious freedom.

“It’s a two-lane campaign, and often those two lanes merge into one lane. The two lanes are controversy over Kris Kobach, and then the second lane is Sam Brownback. And what Kelly is trying to do ... in every possible permutation of TV ad, make those lanes merge, [saying] Kobach is Brownback.”

Polling shows a large percentage of voters have unfavorable views of Kobach, known nationally for his staunch anti-immigration views and backing perhaps the most restrictive voting law in the country. With the exception of Brownback, every living former Kansas governor, including two Republicans, have endorsed Kelly. The state’s GOP former Sen. Nancy Kassebaum has also endorsed Kelly.

Kelly has outraised Kobach, whose campaign is largely being funded by his pick for lieutenant governor. Beatty said her strong fundraising was significant because it allowed her to show voters she was a possible alternative to Kobach.

“If the Democrats don’t have the money to show them that the Democrat is acceptable, the default goes to the Republican. What she’s done well is raise money to at least allow people to see that she’s an acceptable alternative,” he said. “A lot of times in Kansas, there may be an acceptable alternative for the Democrats, but no one knows who they are.”

As governor, Brownback oversaw drastic tax cuts in the state, but the results were so catastrophic for the state that Republican lawmakers voted to overturn them. The tax cuts are a central dispute in the campaign; Kobach says he wants to implement the tax cut again while cutting spending, which Kelly says would be a disaster. He accuses her of wanting to raise taxes. They have also sparred over education funding: Kobach is critical of a state Supreme Court decision ordering more education funding and says he wants to change the way officials spend school funds. Kelly supports increasing education funding.

Anti-Brownback feeling is also powering Davis’ and Davids’ campaigns. Before the Kansas City suburbs turned against Trump in 2016, they voted overwhelmingly against Brownback in 2014 because of his education cuts. That trend line is helping Davids, a former MMA fighter and White House fellow who would be one of the first Native American women elected to Congress.

Davis was the Democratic nominee against Brownback in 2014. While he narrowly lost that contest, the moderate Democrat’s residual name identification has helped him campaign and raise money in the district. He has also been aided by a series of scandals enveloping Watkins, including an accusation of sexual misconduct and a revelation that he embellished his role in building a business after leaving the military.

The governor’s race is complicated by the presence of a third candidate, Greg Orman, a wealthy businessman running as an independent who served as the de facto Democratic Senate candidate in 2014 against GOP Sen. Pat Roberts. Orman is polling around 10 percent and is believed to be pulling more votes from Kelly than Kobach. While national Democrats were hopeful he would drop out after failing to catch on with voters, his continued presence in the contest could swing the race to Kobach.

Because the opposition is split, Kobach can win if he drives up turnout among his conservative base. He is close with President Trump, who reportedly wanted Kobach to lead the Department of Homeland Security and tapped him to lead a controversial panel to investigate voter fraud in the 2016 elections. Trump endorsed Kobach in the primary.

“If we didn’t have a divided general, I think it might be dicier for Kobach to embrace Trump. But given that he’s not shooting for 50 percent — he’s shooting for 40 or 42 — he can do that freely,” said Patrick Miller, a political science professor at the University of Kansas. “That being said, there’s been no evidence that any of the Trumps or Pence or Ted Nugent or any of these high-profile characters who have come in — there’s no evidence they’ve moved the polls for or against him.”

Kelly has been a state senator since 2005. During the Democratic primary, she faced criticism for being too close to the NRA and for her 2015 vote to let Kansans carry concealed weapons without a permit. She said she immediately recognized the vote went too far and has voted recently in favor of gun restrictions, including banning guns on college campuses. In September the National Rifle Association endorsed Kobach, who supports loosening gun restrictions.

She says she would block any new abortion restrictions, while he favors a state amendment clarifying that the Kansas Constitution does not guarantee a right to an abortion. She favors expanding Medicaid in the state, which he opposes.

Kansas encountered a similar situation in 2014, when polls shortly before the election predicted that Davis would oust the governor. Brownback won. Beatty said this election feels different. In 2014 the polls didn’t capture a lack of Democratic enthusiasm for Davis.

Burdett Loomis, a political science professor at the University of Kansas, said Kelly had been reluctant to get in the race and was initially much less known than Kobach throughout the state.

“She’s not flashy, but she’s very steady, good on the issues, I think, and has really worked hard. She did not want to run. She’s 68. Kathleen Sebelius basically talked her into running,” he said. “Somewhere in the last few months, she’s found her footing of being quiet but conveying a kind of toughness. She wasn’t going to become flashy.”