Democratic state lawmaker John Bel Edwards defeated Republican Sen. David Vitter in Saturday’s runoff election for Louisiana governor.

Edwards will take over the office from former 2016 Republican presidential candidate Gov. Bobby Jindal in January.

After the results were announced, Vitter said he will also not run for re-election to the Senate.

Vitter entered the race as the early favorite amid a field of lesser known and lesser funded candidates, including state Democratic Rep. Edwards. However, after months of attacks, include those about his 2007 prostitution scandal, Vitter barely defeated his two Republican challengers in last month’s open primary and finished second behind Edwards by roughly 14 percentage points.

Edwards thanked voters in a statement late Saturday. He reiterated that Louisiana didn’t belong to a political party, but to all Louisianans.

To be sure, Democrats didn’t expect to win the Louisiana governorship, considering Republicans now control every governorship and state legislature in the Deep South.

And when Vitter entered the race in January 2014 as the frontrunner, he was pulling in tremendous sums of campaign cash and firing up a dominant political machine that he's used to get himself and his allies regularly elected to Louisiana offices.

But the race ultimately shifted to a referendum on Vitter, particularly his 2007 prostitution scandal, in which he apologized for a "serious sin" after he was linked through phone records to Washington's "D.C. Madam."

He's also faced criticism for his campaign tactics, and he's been unable to unify GOP support, which has also hurt his fundraising during the runoff.

In the final days leading up to the election, Vitter sought to rally Republican voters who stayed home in the primary by drawing distinctions with Edwards and making Syrian refugee resettlement an issue in the state campaign. It didn’t work.

Edwards is taking over a state awash in financial problems.

Neither Edwards nor Vitter offered detailed roadmaps for tackling the budget woes, and the general outlines they touted were largely similar in approach.

Rather than a race about the state's deep financial troubles, the contest for governor largely became a referendum on Vitter, who has been in elected office, first as a state lawmaker and then in Congress, for more than 20 years.

The race has also been a slugfest of attack ads and one of the most expensive governor's races in Louisiana history, with at least $30 million spent by candidates and outside groups.

Edwards, who began his gubernatorial bid as a little-known lawmaker from rural Tangipahoa Parish, responded to the spike in Vitter's disapproval ratings with a campaign built on personal integrity, a resume that includes a West Point degree and a tenure as an Army Ranger, and pledges that he'd run a moderate administration built on bipartisanship.

"This election is too critical. The stakes are too high. We cannot have someone who comes from a dysfunctional Washington political environment," Edwards said.

Edwards is the first Democrat elected statewide since 2008 in a state that favors Republicans in those races.

Fox News’ Chad Pergram and The Associated Press contributed to this report.