The next senator from Mississippi wasn’t decided on Election Day — instead, Republican Sen. Cindy Hyde-Smith and Democrat Mike Espy will face off in what is sure to be a close runoff election later this month.

Mississippi uses what’s known as a jungle primary: Every candidate from both parties runs in the first race on Election Day in November. If one candidate gets 50 percent of the total vote, they win. But if they don’t — and nobody did on Election Day — the top two candidates face each other in a runoff election the same month.

Related 4 winners and 2 losers from the 2018 midterm elections

Neither Hyde-Smith, who was appointed to the Senate this year to replace retiring incumbent Thad Cochran, nor Espy managed to clear 50 percent. But they were the top two vote-getters in what essentially ended up being a three-way race with conservative darling Chris McDaniel. They will face each other in the runoff on November 27.

Every Senate seat is critical — as the past year showed, with Republicans falling short of Obamacare repeal by one vote — and so the Mississippi runoff is sure to be the focus for both parties over the next month. Hyde-Smith has generally pulled ahead of Espy in a two-way race, but the Democrat is polling strongly enough that he does have an outside chance to pull off the upset.

Espy comes with some baggage after being acquitted of bribery charges in the 1990s. The 64-year-old represented the Jackson area in Congress for six years before going on to serve as President Bill Clinton’s secretary of agriculture from 1993 to 1994.

But he was forced to step down amid an ethics investigation after allegations that he improperly received airplane and sports tickets. Espy was eventually acquitted on all charges, but it more or less ended his career in politics; he has been out of public office for nearly 25 years, spending the past decade as a private attorney.

Still, in a state that is one-third black, Espy, who is African-American, has some built-in advantages. He’s a familiar face against a relatively unknown candidate: Hyde-Smith, the incumbent, is well liked but little known. Morning Consult found in October that 39 percent of voters approved of her job performance, just 22 percent disapproved, and 39 percent said they had no opinion of their junior senator.

Hyde-Smith’s advancement to the runoff is the end of another story, too: one of the strangest intra-GOP feuds in the country.

McDaniel, a former state senator with ties to the neo-Confederate movement, had been prepared to challenge Mississippi’s other Republican senator, Roger Wicker, in the primary, at Trump confidant Steve Bannon’s urging. But he instead opted to run for Cochran’s seat after the longtime Republican senator decided to step down.

McDaniel had already challenged Cochran in a bitterly contested 2014 Republican primary — it involved a break-in and a suicide — and to this day, his supporters contend that election was stolen from him in part because many of the black voters in the state lined up behind Cochran.

McDaniel had once upon a time lobbied Mississippi Gov. Phil Bryant to name him as Cochran’s replacement, the Washington Post reported. But the governor wasn’t interested.

There remained a lot of bad blood between McDaniel and the Republican establishment, left over from the 2014 primary between Cochran and McDaniel. Bryant even took a swing at McDaniel after the state senator announced he would switch from the Wicker race to run for the Cochran seat.

“This opportunistic behavior is a sad commentary for a young man who once had great potential,” Bryant told the Jackson Clarion-Ledger.

The newspaper reported that Bryant was looking for a candidate who was particularly well suited to beating McDaniel. He settled on Hyde-Smith, who had been serving as the state agriculture commissioner.