(CNN) — Georgia Secretary of State Brian Kemp will win the Republican nomination in the state's governor's race, CNN projects, setting up a general election battle against Democratic nominee Stacey Abrams in the fall.

It's another victory for President Donald Trump, who had backed Kemp over Lt. Gov. Casey Cagle in the final week of what turned out to be a nasty primary runoff.

The Georgia contest was already in the national spotlight: Abrams is a rising progressive star vying to become the nation's first black female governor. And Georgia's move leftward in 2016 -- Trump beat Hillary Clinton there by just under six percentage points -- means both parties are looking to the governor's race as a test of whether the state will be in play in 2020.

Cagle was long thought to be the frontrunner and finished first with 38.9% of the vote in May's primary to Kemp's 25.6%. But because Cagle fell short of 50%, they advanced to a runoff, which had become a contest between the two candidates to cozy up to Trump.

Polls showed the race had swung in Kemp's direction after the primary. Then, he got a major boost last week when Trump unexpectedly extended his "full and total endorsement" in a tweet.

"Brian is tough on crime, strong on the border and illegal immigration. He loves our Military and our Vets and protects our Second Amendment," Trump tweeted.

The President repeated that endorsement Tuesday morning.

"Today is the day to vote for Brian Kemp. Will be great for Georgia, full Endorsement!" he tweeted.

It's another successful endorsement for Trump, who recently backed Katie Arrington as she ousted South Carolina Rep. Mark Sanford in a primary and backed Alabama Rep. Martha Roby as she fended off a challenge in a runoff this month.

Cagle's campaign was undercut by a secret recording in which he told a former rival the GOP governor's race was a contest over "who could be the craziest" and admitted supporting "bad public policy" to undercut an opponent's fundraising.

Kemp bashed Cagle over the tape in television ads and debates and labeled Cagle "Pinocchio."

Kemp engendered controversy when he released an ad where he pointed a gun at a young man, who he said was interested in one of his daughters, and continued holding the gun as the pair went through his platform. In another ad where he touted himself as a "politically incorrect conservative," Kemp said he had a "big truck" in case he needed "to round up criminal illegals and take them home myself."

Some Republicans had worried that Kemp is a weaker candidate for November's general election than Cagle.

But Vice President Mike Pence -- whose chief of staff, Nick Ayers, is a veteran Georgia Republican operative -- visited the state on Saturday to campaign for Kemp.

At the rally in Macon, The Atlanta Journal-Constitution reported, Kemp said he was tired of "politically correct liberals like Stacey Abrams who are offended by our faith, our guns and our big trucks."

Pence said Kemp would bring "the same type of leadership that Trump brought to the White House."