The Supreme Court confirmation hearings for Judge Brett Kavanaugh have been a messy, often ugly, affair that has tarred those on all sides. Democrats have accused Republicans of trying to ram through their nominee to stack the Supreme Court, regardless of the sexual assault allegations leveled against him. Republicans argue this is a political hit job from their Democratic colleagues, who sat on Dr. Christine Blasey Ford’s allegations for weeks.

Nonetheless, the conflict could actually work in either party’s favor come November, especially if the outcome is the unwanted one and incensed base voters are eager to express their displeasure at the polls.

The past few weeks have fired up Republican voters in a way previously unseen this cycle. Pollsters say that while Democratic turnout has been high throughout the primaries, Republicans now have the fire in the belly to head to their polling places in five weeks. “Both sides will benefit but what happens [with Kavanaugh’s confirmation] will frame it most,” said Robert Cahaly, a pollster and senior strategist at The Trafalgar Group, a political consulting firm. “GOP turnout would most significantly increase if he doesn't get approved.”

Cahaly’s group has done polling in several Senate races across the country this year, including in two states the GOP hopes to flip -- West Virginia and Missouri -- and Kavanaugh’s hearings have played big, he said. The West Virginia poll on Democratic Sen. Joe Manchin’s re-election race — taken before the hearings — showed the incumbent with a whopping 29-point lead if he voted to confirm the Supreme Court nominee. That lead dwindled to two points if he voted against Kavanaugh’s nomination. The Missouri poll — taken amid the initial report of Ford’s allegation — showed Democratic Sen. Claire McCaskill in a dead heat with her Republican challenger, Attorney General Josh Hawley, if she voted for Kavanaugh. If she voted against him, McCaskill trailed Hawley by nearly six points.

Public Opinion Strategies surveys in West Virginia and Arizona taken 24 hours after the testimonies of Kavanaugh and Ford last week showed a majority of voters remain behind the nominee. The polls were released Friday by the Judicial Crisis Network, which has been promoting the appellate court judge since his nomination was announced. “Joe Manchin has a choice,” said Carrie Severino, chief counsel at the Judicial Crisis Network. “Stand with Chuck Schumer and his smear campaign or stand with the people of West Virginia who overwhelmingly support President's Trump extraordinarily qualified nominee, Brett Kavanaugh.”

Supreme Court nominations were a major issue for voters in 2016, particularly Republican voters, and appointing a justice to the key swing seat vacated by Anthony Kennedy earlier this year would be a major victory for President Trump. Rather than energize the GOP base, one strategist believes a failure to win confirmation for Kavanaugh could discourage Republicans from voting. “Republican voters overwhelmingly believe Kavanaugh has been treated unfairly and deserves to be confirmed,” said Alex Conant, the GOP strategist. “Failure would almost certainly further frustrate and depress Republican turnout.”

Democrats believe the Kavanaugh hearing chaos could lead to even higher turnout than expected on their side. “Democratic turnout may be the highest ever in a midterm election history,” said Brandon Neal, former political director for the Democratic National Committee. “We do not want someone who has the potential to abuse their power at [a] higher level of the judicial system. Voter turnout is key. True power is in the vote.”

Although Democrats are looking for improved turnout across the board, they are zoning in on one group in particular: young women. Ford’s testimony, combined with the year-long #MeToo movement and longstanding sexual assault allegations against the president, have all put women in the power seat for this election, particularly younger voters with college degrees who have long despised Trump.

“It will definitely increase turnout among Democrats, including millennial women, [and] unmarried women under 55,” said Celinda Lake, a Democratic strategist. But she added that peak turnout for Democrats is still uncertain, despite record levels of voters showing up during primary and special elections this year: “It is far from done how many will turn out.”

Grassroots organizations, including the Women’s March, have capitalized on the issue and tried to funnel the momentum into votes. In addition to the group’s more incendiary tactics — the Women’s March Twitter page referred to Republicans on the Senate Judiciary Committee as rape apologists — leaders are using voter engagement tools to get women to the polls. After Ford’s testimony, members organized a day of action across the country. Throughout the month of October, they plan to have phone banking events to reach out to other women and make sure they’re voting. The “Call Your Sister” outreach is sponsored through the group’s voter registration affiliate, Power to the Polls.

Republicans are also experiencing a different kind of benefit from the Kavanaugh hearings. While the Senate has appeared highly partisan, the conservative movement has been united in a way unseen since the pre-Trump era. Jonah Goldberg of National Review — who is not a supporter of the president — said the hearings were almost a relief. “…[F]inally, there was a left-right fight about which I am largely un-conflicted,” he wrote in his weekly newsletter. “This wasn’t a brouhaha about Trump or any of the usual stuff. The issue here was that the Democrats and their abettors in the media simply behaved atrociously.”

Conservative commentator Hugh Hewitt — who has gone back and forth on Trump since the primaries — has been a strong advocate of Kavanaugh and equated the Democrats’ behavior during the hearings to those of the McCarthy era. “McCarthyist tactics. Change the story. Move the smear,” he tweeted. “Attack righteous indignation on the part of the accused. Demand another show trial. They will keep attacking until decent people stand up and censure them. Where are you @ChrisCoons and @SenAngusKing?”

Trump agreed Kavanaugh has been subjected to unfair standards and questioning by Democrats. Speaking at an event in the Rose Garden on Monday, he accused Connecticut Sen. Richard Blumenthal of hypocrisy in attacking the nominee’s past, citing the lawmaker’s misstatements about his military service. The president also insinuated that he knew of questionable behavior in Democratic senators’ past. “I know them too well. And you know what? They are not angels,” Trump said. When asked to elaborate, he demurred. “I think I will save it for a book like everybody else,” he said.