The race was incredibly close for most of the night, but late returns from blue-leaning districts pushed Edwards ahead.

NEW ORLEANS — Louisiana Governor John Bel Edwards won re-election to a second term Saturday night in the closest Louisiana gubernatorial race in decades.

Experts say African American voters were the key to his success, and that Donald Trump was a double-edged sword for his opponent, Republican businessman Eddie Rispone.

Here's a breakdown of how the major players in the race set up that win:

John Bel Edwards

Heading into the primary election in October, the main question for the governor was if he would win outright with 51% of the vote or if the split Republican vote between Rispone and Rep. Ralph Abraham would keep him in the 40s.

Edwards got about 49% of that vote, with the Republicans combined taking in about 51%.

"John Bel Edwards won with African American votes and African American turnout," political analyst Ron Faucheux said. "The 51% that Republicans got combined in the primary fell to 49% in the runoff, and that was largely due to increased African American turnout."

Edwards spent much of his time in the closing days of the race in predominantly-black areas, trying to bring more black voters to the polls. During the last week of the campaign, Mayor LaToya Cantrell stumped for the incumbent governor.

"This race really proved to be rural vs. urban, and Governor Edwards really performed so well in all of the urban areas," said pollster and analyst Greg Rigamer.

The strategy worked overwhelmingly. By the time final results came in Saturday night, Edwards had secured about 99% of the African American vote, according to WWL-TV's election analysis

By 9:45 p.m., WWL-TV called the election for Edwards because 93% of returns had come in, and the majority outstanding were from predominantly black districts, which had broken universally for the Democrat.

Across the state, 63% of the population is white, 33% is black and other races make up the remaining 4%.

Even among white voters, Edwards performed well, grabbing about 30% of the white vote.

WWL-TV political analyst Clancy DuBos said Edwards' unique positions likely played a role in his strong performance.

"John Bel Edwards is not a one-off, but he's a very unique Democrat," DuBos said. "He has a military background with West Point and his Army Ranger career, he's pro-gun 100%, pro-life 100%, he's rural but he's Catholic. He checks all the boxes. If he were anywhere outside of the Deep South, he'd be a runaway favorite Republican."

President Donald Trump

The president was clearly a catalyst in the race, according to analysts.

"There's nothing secret about Donald Trump," DuBos said on election night. "He was the obvious weapon. And it was a good choice for Republicans."

Trump visited Louisiana three times in the past two months, once in October to support both Republican candidates in a "unity rally" seemingly designed to consolidate conservative voters, and twice in support of Rispone after he secured a spot in the runoff.

"It just couldn't overcome the fact that John Bel Edwards, although he's a Democrat, is highly regarded, even among enough Republicans to put him over the top," DuBos said. "That was true four years ago, before Donald Trump burst onto the scene and became president. It's still true, by a closer margin, but it's still true.

The presidential visits may have also rallied unlikely voters to go to the polls. The African American turnout jump from the primary could be partially attributed to disapproval among black voters.

"Trump is a double-edged sword everywhere he goes," DuBos said. "He turns out his own base, of course, but he also turns out people who are against him.

Trump had been hoping for a win after voters in Kentucky voted Democrat Andy Beshear into the governor's mansion on Nov. 5. But the president's Twitter, which encouraged voters to turn out for Rispone four times Saturday morning, was silent on the Louisiana election after results began coming in.

But the Democratic win is "limited" at best.

"How many national Democrats are pro-life and pro-gun rights the way John Bel Edwards is," Faucheux said. "It's a defeat for the president. I don't know that he can be blamed for it."

Anecdotally, many people on social media who say they voted for Edwards said Trump was a factor in that decision.

The election, analysts told WWL-TV, was a sign from Louisiana voters that the governor should focus on the state over national issues.

"It was really more about state issues and state personalities, even though Trump did have a role in it," Faucheux said. "But from the standpoint that it's a victory for Democrats, that victory is pretty limited."

Eddie Rispone

Most of the analysis Saturday focused on what Edwards did right, rather than what Rispone did wrong during the campaign.

That's because, as WWL-TV reporter Paul Murphy said at Rispone's Baton Rouge election night party, "There wasn't one person we talked to that thought this was going to be a runaway for either one of the candidates."

Rispone got 27% of the vote in the primary, beating out Abraham's 23% by about 50,000 votes. In the month after, he tried to consolidate the Republicans behind him.

"By no means has this candidate not done a good job tonight," Murphy told viewers shortly after the election was called for Edwards. "He just might not get the most votes."

The strongest results for the Republican came from smaller parishes like Caldwell and Cameron parishes. Rispone took 75% of the vote in both.

But in more populous parishes, he couldn't get an edge. In Jefferson Parish, he trailed Edwards throughout the night, finally stopping 22,000 votes behind with 43% of the vote.

Statewide, Rispone lost by about 40,000 votes. But in Orleans Parish, he collected only 13,000 votes to Edwards' 114,000.

Rispone tied himself closely to Trump, appearing at times to be positioning himself as a local version of the president.

"I think it is simply Louisiana voters saying, by a narrow margin, we think the governor should be focused on Louisiana, not on national issues," DuBos said.

But the split during the primary hurt Rispone in the runoff, especially in some northern Louisiana areas.

"In Ralph Abraham's district, Governor Edwards received about 45% of the vote tonight," Rigamer said. "That's up from about 39% he received in the primary."

Despite the damage caused by the inter-party struggle, for much of the night, Rispone was leading by narrow margins. At one point in the night, fewer than 100 votes separated the candidates.

"It really could have gone either way," Rigamer said. "It was really close for an incumbent governor."