Democrat Laura Kelly projected to beat Republican Kris Kobach for Kansas governor: NBC News

Democratic candidate state senator Laura Kelly responds to questions on stage during the Gubernatorial debate at the Kansas State Fair in Hutchinson, Kansas, September 8, 2018. 
Mark Reinstein | Corbis Historical | Getty Images

Democratic state Sen. Laura Kelly will win the gubernatorial election against Kansas Secretary of State Kris Kobach, NBC News projects, just in time to have a hand in the upcoming redistricting battle that could shape control of the state for the next decade.

The race was in a dead heat days before the election, with Kobach either up by 1 point or in a tie with Kelly.

Record number of women elected to the House

Independent candidate Greg Orman, a Kansas City businessman, trailed far behind both candidates but was seen as a threat to Kelly's bid in a state that voted for President Donald Trump in 2016 by 20 points.

Kelly will have the ability to influence the state's redistricting process following the 2020 Census, and could veto congressional and state legislative district maps proposed by the Kansas Legislature.