Amy McGrath, a former Marine fighter pilot, fended off a challenge from an upstart progressive, Charles Booker, ABC News projects, nabbing the Democratic nomination on Tuesday to take on Senate Majority Leader Mitch McConnell in November.

McGrath’s victory comes a full week after voters headed to the polls last Tuesday in the hard-fought Senate primary — a delay brought on by the influx of absentee ballots due to the coronavirus and the tougher-than-expected contest shaped by the national unrest over racial injustice and police brutality.

The race wasn’t expected to be tight just one month ago, but the campaign was upended in its closing weeks by the fallout from the deaths of African Americans at the hands of law enforcement, including two in the state of Kentucky since mid-March.

Despite having the backing of national Democrats and a formidable war chest, McGrath found herself in an increasingly competitive battle for the nomination with Booker, 35, the youngest black state lawmaker in Kentucky from the Louisville-area.

Harnessing the energy of the protests and the party’s liberal wing, with endorsements from progressive darlings, Sen. Bernie Sanders, I-Vt., Sen. Elizabeth Warren, D-Mass., and Rep. Alexandria Ocasio-Cortez, D-N.Y., Booker offset McGrath’s advantages with grassroots momentum in the lead up to in-person voting.

The race emerged as an electoral test of the impact of the movement — born out of the response to the recent deaths of George Floyd and Louisville’s own Breonna Taylor — on what kind of candidate Democrats want to put forward to meet the moment. It’s also a test for a candidate whose life story reflects much of the themes in the demonstrations.

On the eve of the election, Booker told ABC News that he is poised to deliver a shock to the political world, as his candidacy, he said, reflects the movement and momentum that swept him into contention for the nomination.

“We know that we can do the work to end poverty and to end injustice and to address the racial structural inequity that rob so many people have the chance of doing anything more, the struggle,” he said. “And so we’re fighting back and we’re showing the country and the world what Kentucky is made of … and I’m fired up.”

McGrath even acknowledged that Booker’s personal connection to the energy fueling the demonstrations across the country made him a formidable opponent.

“His life experience. He has a voice for these things. And I think that that’s an important voice. I do believe we need to come together as Democrats to defeat Mitch McConnell,” she said.

But McGrath’s outsider status withstood Booker’s efforts to define her a moderate, more-of-the-same, “pro-Trump Democrat” that is part of the “political establishment.”

McGrath entered the Senate race as the preferred candidate of the party establishment, earning the backing of the Democratic Senatorial Campaign Committee in February and establishing her campaign as a fundraising behemoth after launching her Senate bid in July 2019, with more than $40 million in her war chest.

Before Tuesday, it was not clear who would ultimately be handed a victory, since some Kentucky counties, including the state’s two largest, withheld even partial results until June 30, after all mail ballots were tabulated. Earlier on Tuesday, Booker captured both Jefferson and Fayette counties, which cover Louisville and Lexington, but his edge was not enough to counter McGrath’s lead with absentee ballots and some of the more rural parts of the state.

McGrath led Booker 45% to 43% or by just under 12,000 votes, with 95% of the expected vote in.

But now, the former congressional candidate who lost to GOP Congressman Andy Barr in 2018, faces a steeper uphill climb, as she aims to unseat the top Republican in Congress in a state President Donald Trump won by nearly 30 points four years ago.

Within minutes of McGrath scoring her win in the primary, McConnell’s campaign welcomed her into the general election ring, already seeking to cast her as a “tool of the Washington Democratic establishment.”

“Extreme Amy McGrath is lucky to have gotten out of the primary with a victory, but her reputation sustained significant damage all across Kentucky,” said Kate Cooksey, a spokesperson for McConnell’s campaign. “McGrath is just another tool of the Washington Democratic establishment who has no idea what matters most to Kentuckians. It’s clear this self-proclaimed most liberal person in Kentucky who supports government-run health care and abortion even in the ninth month does not represent Kentucky values. Amy, it’s great to have you.”

McGrath, pointing to last year’s race between Democrat Andy Beshear and then-incumbent Republican Gov. Matt Bevin, called for Democrats to unite behind her campaign to unseat McConnell, who has been in office for more than 30 years.

“There can be no removal of Mitch McConnell without unity,” she said in a statement after her win. “He’s destroyed our institutions for far too long. … A year after showing the country that Kentucky won’t hesitate to replace an incompetent and unpopular incumbent Republican like Matt Bevin, let’s do it one more time.”