President Donald Trump was minutes into a fiery speech at a rally in southern Minnesota this week when he launched his latest rhetorical attack on the political storm surrounding Supreme Court nominee Brett Kavanaugh.

On the eve of a crucial and uncertain showdown over Kavanaugh in the Senate, the president revved up the raucous crowd, blasting Democrats for “trying to destroy” the Court of Appeals judge and predicting they would pay a price in the November elections.

“Their rage-fueled resistance is starting to backfire,” Trump told the audience, which responded with chants of Kavanaugh’s name. “These people are loco.”

The comments were the latest indication that Trump views the fight to confirm his embattled Supreme Court nominee as a potent issue for the midterms and one that could rile up the Republican base in a year when Democrats are seen as the more energized party.

In an election where turnout will almost certainly decide control of Congress, Republican operatives say the president saw an opportunity to turn a liability around.

White House aides had initially taken a more cautious approach, advising the president to tread carefully around a controversy that may still sour suburban women and independent voters. But in recent days Trump changed tack, viewing an outcry over the last-minute allegations of sexual assault against Kavanaugh as a way to drive turnout.

“The springs are all wound pretty tight right now,” said J.C. Martin, chairman of the Republican Party in Polk County, Florida.

Republicans have cheered early polling and fundraising numbers indicating that the Kavanaugh controversy helped to close an enthusiasm gap between the parties. A 10-point split in July between the number of Democrats and Republicans who described the election as “very important” all but disappeared, according to an NPR/PBS NewsHour/Marist poll this week.

Polls in marquee Senate races, including North Dakota, Missouri and Arizona, showed Republicans gaining some ground during the height of the Kavanaugh fight.

“This whole story has boomeranged against the Democrats in ways no one could have predicted,” said Texas-based GOP political consultant Matt Mackowiak. “Now the challenge is not losing the intensity.”

The approach Republican candidates are most likely to take, several political consultants said, is to blame Democrats for the process, including the last-minute nature of the allegations and the partisanship that followed. That is a message many Republicans can support, regardless of their thoughts on Kavanaugh.