As soon as Republican Sen. Darline Graham won the GOP nomination to replace her late brother in August, Democrat Annie Andrews made her move.

Andrews immediately began spending more than $5 million on advertising in South Carolina’s Senate race at a moment when she largely had the airwaves to herself as her new opponent struggled to raise money. At the time, Republicans were racing to prioritize other competitive races across the country — and most people in both parties still saw South Carolina as a pipe dream for Democrats.

But by October, when the rest of the country began tuning into South Carolina — and spending money — Andrews had quietly become the frontrunner, according to internal campaign details shared with Semafor following her victory on Tuesday.

On Oct. 5, the Andrews campaign received a poll showing her with a 3-point lead over Graham. But the Democrat’s campaign decided against publicly releasing the poll — or any subsequent internal poll — showing Andrews with a lead over Graham, wary of drawing too much attention from national Republicans and jeopardizing a peak at the right time, according to Chas Goldman, a strategist for Andrews.

That Republican attention did come, but not in time to save Graham in a state where Democrats hadn’t won a Senate race since 1998. On a Senate map filled with shocking GOP losses, South Carolina stands out: It’s the home of the National Republican Senatorial Committee chair, Tim Scott, and territory on which Democrats tried to compete statewide in 2020 — and lost handily.

Former GOP Rep. and Gov. Mark Sanford, R-S.C., told Semafor on Wednesday that he could feel the anti-Graham sentiment building on the state’s coast but that most Republicans still felt that Graham could “nose it out” elsewhere. Ultimately, though, he said President Donald Trump’s backing of Graham in a crowded primary which included Sanford and Reps. Ralph Norman and Russell Fry “never sat well with folks.”

Sanford said Andrews did a good job appealing to disaffected Republicans but also said the rejection of Graham amounted to “a Waterloo moment for Trump.”

“The fact that a state as red as South Carolina would go the other way on his hand-picked candidate? This is a person who said: ‘Close your eyes and pretend you’re voting for me.’ OK, they did,” Sanford told Semafor. “They just didn’t like Darline as a candidate and felt it had been forced down their throats by Trump. And they’re like: ‘We’re not doing this.’”

Andrews outran her party’s gubernatorial nominee by 4 percentage points, evidence of both her strength and Graham’s weakness as a candidate. Graham ran behind Alan Wilson, the Republican governor-elect, by roughly 100,000 votes.

In an interview with Semafor in early September, Andrews said she welcomed help from national Democrats and “anyone who wants to help me win this race, but I am confident I can do it without investment from the national party.”

“I’m on TV, she’s not up yet, and that’s a huge advantage,” Andrews said of Graham at the time. “All of the ingredients are in place, and I’ve been gifted with what is frankly an incredibly weak opponent. I’m ready.”