Underdog conservative outsider Bill Lee upset a crowded field of well-funded, better-known candidates to win Tennessee's Republican gubernatorial primary Thursday, sending shockwaves through a state where he was down double-digits in polls as recently as last month.

U.S. Rep. Diane Black, who had the endorsement of Vice President Mike Pence, was the clear favorite in the race. Former state economic development chief Randy Boyd, who had the backing of former Arkansas Gov. Mike Huckabee, was widely considered Black's chief rival.

But President Trump, who has a 56 percent approval rating in Tennessee, stopped short of endorsing any candidate in the race, including Black -- despite keeping her by his side and praising her at several events.

Lee, a businessman whose poll numbers surged dramatically in the last week of the campaign, took advantage of infighting among his rivals, as he traveled the state and touted his Christian values while Boyd and Black sparred.

On the eve of the primary vote, supporters of Black's campaign, perhaps realizing the threat posed by Lee's insurgent candidacy, released an attack advertisement suggesting Lee's company had terminated an employee and Army National Guard member for being deployed.

Lee strongly denied the allegations, and his company sent out a cease-and-desist letter concerning the messaging.

Harsh rhetoric in the campaign was backed by big money. The top four Republican contenders for governor, including Black, Lee, Boyd, and State House Speaker Beth Harwell, spent a combined $40 million of their own personal wealth fighting over who is more devoted to Trump, setting records and underscoring the president's continuing influence in state races. The candidates were seeking to replace the state's term-limited Gov. Bill Haslam.

Lee reportedly spent roughly $7 million on the race overall, compared to nearly $14 million by Black and $21 million by Boyd.

Former Nashville Mayor Karl Dean, a moderate, won the Democratic primary for the state's governorship, defeating state House Minority Leader Craig Fitzhugh in a mostly cordial race. But the surprising results in the Republican gubernatorial primary contest will reverberate nationally, serving as a bellwether for Trump enthusiasm and establishment influence in a state that supported the president by double digits in 2016.

Meanwhile, the Democratic and Republican Senate primaries on Thursday provided less drama, but posed perhaps even greater national significance.

U.S. Rep. Marsha Blackburn won the Republican nomination in Tennessee's open U.S. Senate race to replace the retiring Sen. Bob Corker, which holds major implications for Democrats' chances for overturning the 51-49 Republican Senate majority in November.

Blackburn easily overcame minimal opposition in Thursday's primary. She and former Gov. Phil Bredesen, who won the state's Democratic primary on Thursday, have long looked past the primaries to their upcoming general election matchup.

Polls have shown Blackburn and Bredesen are neck-and-neck in the race, which Fox News currently assesses is a tossup. Blackburn could become the first woman elected to the U.S. Senate by Tennessee voters.

She calls herself a "hardcore, card-carrying Tennessee conservative" who would fight for President Donald Trump's agenda.

Bredesen is running as an independent thinker who says he will work with Trump when his ideas make sense for Tennessee and oppose him when they don't.



MEET THE CANDIDATES: WHO ARE THE KEY PLAYERS IN TENNESSEE'S GUBERNATORIAL RACE?

The Blackburn-Bredesen showdown is among several races crucial to Trump’s plans to maintain control of the Senate, where Republicans are defending a narrow two-seat majority. If Democrats retake the Senate, it would deal a major blow to Trump's agenda, hampering his ability to appoint federal judges and all but killing the prospect of signature initiatives like a southern border wall.

Trump has endorsed Blackburn, an eight-term congresswoman, and traveled to Tennessee in May to campaign for her. Blackburn told Fox News at the time that Trump's support had helped her candidacy build "momentum."

Blackburn served on Trump’s transition team and has not shied away from embracing the president. She is one of the lawmakers who signed onto a letter nominating him for the Nobel Peace Prize.

In a Thursday appearance, Governor Haslam touted Blackburn's candidacy. The governor suggested that keeping Republican Senate control is important in part because Tennessee Sen. Lamar Alexander would lose his health committee chairmanship, among other leadership changes.

Bredesen, 74, has helped his viability in the red state by assuring voters that he is not hyperpartisan and promising he is not “running against” Trump. If elected, he will become the first Democrat to win a Senate campaign in the Volunteer State since Al Gore in 1990.

BATTLE LINES DRAWN AS DEMOCRATS HOPE TO FLIP CRITICAL TENNESSEE SENATE SEAT

A Harvard graduate worth tens of millions of dollars, Bredesen has touted his business credentials, saying they will help him win over “economic Republicans, the more traditional-minded Republicans" in November.

He also has received some high-profile support of his own. Corker, a Republican and frequent Trump critic, has praised Bredesen in the race, calling him a "very good mayor, a very good governor, a very good business person."

By contrast, Corker has often had harsh words for Trump. In a dramatic moment at a hearing in July, for example, Corker pressed Secretary of State Mike Pompeo to explain what he characterized as Trump's "purposeful" efforts to sow misinformation and discord.

WATCH: POMPEO FIGHTS BACK AFTER CORKER HITS TRUMP FOR SOWING 'DISTRUST' ON PURPOSE

Corker, the chairman of the Senate Foreign Relations Committee, has previously acknowledged his attacks on Trump might not be endearing him to many of his constituents.

Tennessee, like its southern neighbors, was once dominated by Democrats. But it hasn't elected one to statewide office since 2006, and in 2012 Republicans secured supermajorities in both houses for the first time since Reconstruction.

Voters also decided on nominees for nine House races on Thursday.

Fox News' Kaitlyn Schallhorn and The Associated Press contributed to this report.