Kansas Secretary of State Kris Kobach, a staunch ally of President Trump Donald John TrumpSteele Dossier sub-source was subject of FBI counterintelligence probe Pelosi slams Trump executive order on pre-existing conditions: It 'isn't worth the paper it's signed on' Trump 'no longer angry' at Romney because of Supreme Court stance MORE, has secured the GOP nomination for Kansas governor after his rival conceded Tuesday night following a hotly contested Republican primary.

The state's sitting governor, Jeff Colyer, conceded to his hard-line conservative rival a week after the race remained too close to call with all precincts reporting before counting provisional ballots.

ADVERTISEMENT

Colyer trailed Kobach by just 345 votes out of 315,000 cast, after several counties finished tallying provisional ballots on Tuesday . Koback ended the day with 128,543 votes while Colyer claimed 128,198 votes.

Kobach added to his narrow advantage on Tuesday after critical Johnson County ballots gave him a few more votes than Colyer. Overall, Colyer won Johnson County, his home base and the largest vote center in the state, but by just 6 percentage points.

“I just had a conversation with the secretary of state and I congratulated him on his success and repeated my determination to keep this seat in Republican hands,” a subdued Colyer said Tuesday night. “This election is probably the closest in America, but the numbers just aren’t there unless we go to extraordinary measures.”

Colyer served less than a year in office after ascending to the governorship when his predecessor Sam Brownback (R) left to take an ambassadorship in the Trump administration.

Trump may have delivered the fatal blow to Colyer's hopes of serving a full term, with the president endorsing Kobach in a tweet just a day before the Kansas primary last week.

Kobach had served as vice chairman of the president's election integrity commission, which failed to come up with evidence to back up Trump's false claim that millions of illegal voters had cast ballots in the 2016 presidential election.

In his own press conference Tuesday, Kobach credited Trump for his win.

"There's no question that the election day voting went much more strongly for me as compared to the advance voting," Kobach said, according to The Kansas City Star.

Kobach will now face state Sen. Laura Kelly (D), who easily won her primary last Tuesday, in the November general election.

Though national Republicans warned the White House that Kobach was a weaker general election contender than Colyer, Kobach's path is likely to be smoother because of an independent candidate.

That independent, businessman Greg Orman, ran a strong campaign against Sen. Pat Roberts Charles (Pat) Patrick RobertsThe Hill's Morning Report - Sponsored by Facebook - Washington on edge amid SCOTUS vacancy The Hill's Morning Report - Sponsored by National Industries for the Blind - Trump seeks to flip 'Rage' narrative; Dems block COVID-19 bill GOP senators say coronavirus deal dead until after election MORE (R) in 2014, a sign that he is likely to pull votes from one of the two major candidates later this year.