Republican Rep. Kevin Cramer defeated incumbent Sen. Heidi Heitkamp in North Dakota on Tuesday, putting Democratic dreams of taking over the Senate effectively out of reach.

For weeks, Heitkamp trailed Cramer in the polls in a state that voted overwhelmingly for President Trump in 2016. In fact, she had not lead in a single public poll since February 2018, according to RealClearPolitics.

Cramer spent the campaign criticizing Heitkamp as an unreliable vote for Trump and North Dakota’s conservative-minded voters. Her willingness to buck party leaders on certain issues like gun rights, some environmental regulations, and bank deregulation was not enough.

His case was bolstered when Heitkamp announced her decision not to support Supreme Court Justice Brett Kavanaugh’s confirmation following the testimony of a woman who said Kavanaugh sexually assaulted her when they were in high school.

Heitkamp said her choice was rooted in her work as North Dakota’s attorney general on the Violence Against Women Act as well as her own mother’s story of survival after sexual assault.

But Cramer did not emerge from the Kavanaugh hearings unscathed.

Democrats pounced on the Republican candidate after he questioned whether it was disqualifying if Kavanaugh had, indeed, assaulted Ford. He also created a stir when he suggested the #MeToo movement was a “movement toward victimization.”

But any boost Heitkamp may have received from her message of standing by her principles and Cramer’s tone-deaf comments was immediately undermined by her own campaign.

About a week after she announced her decision, her campaign placed an ad designed to look like an “Open Letter” to Cramer about his Kavanaugh-related comments in a newspaper. The “letter” was signed by victims of domestic violence, who, it turned out, did not give their consent to having their names published.

Heitkamp quickly apologized and fired the unnamed staffer who the campaign said was responsible for the ad.

But the damage was done.