Amy McGrath had already built a $41 million war chest to take on Senator Mitch McConnell of Kentucky, in what was shaping up to be one of his toughest re-election campaigns yet. But over the past week, Ms. McGrath has pumped more than $3.1 million into television ads in the suddenly competitive Democratic primary, flooding television screens across the state at a scale often reserved for the general election.

Ad after ad proclaims that she’s the “only candidate who can win,” a former fighter pilot who has “had to fight the establishment” as she speaks mostly about issues that were central to the 2018 Democratic midterm wave: health care and drug prices.

Her opponent in Tuesday’s primary, Charles Booker, a 35-year-old black state representative, has roared into contention in recent weeks, picking up the endorsements of major progressive figures like Senators Bernie Sanders of Vermont and Elizabeth Warren of Massachusetts and Representative Alexandria Ocasio-Cortez of New York, as well as endorsements from Kentucky’s largest newspaper. He aired his first television ad just two weeks ago, but has spent $738,000 over the past week thanks to a large infusion of donations.

With both candidates limited in their ability to campaign in-person amid the coronavirus pandemic, the television screens of Kentucky are home to the dueling messages of the two campaigns, with Ms. McGrath reaching to respond to the racial justice movement ignited by the killing of George Floyd, and Mr. Booker enjoying a sudden surge that is, in part, born out of it.

In the final hours before Tuesday’s voting, Ms McGrath was visiting mine workers and a food bank, while Mr. Booker held several rallies.

Mr. Booker, who was recently tear-gassed while marching with protesters, has two ads on the air. The first, which began on June 9, lays out his progressive platform, including “Medicare for all,” as he proclaims he’s “fighting for real change” by “mobilizing young and old, black, brown and white.”

His campaign spent $200,000 on his most recent ad, which features Mr. Booker speaking at a protest, “as your brother, as your cousin, as your neighbor, as your fellow good troublemaker.” That is set against a halting debate answer from Ms. McGrath about why she hadn’t joined a protest.

Ms. McGrath has one ad discussing Mr. Floyd’s death, where she speaks directly to the camera from a living room table. But she has spent only $2,000 on the ad, according to Advertising Analytics.

Notably, her most-aired ad is aimed more at female primary voters. In it, she focuses on “why I’m a Democrat,” and talks about how the party is paving the way for women like herself to be fighter pilots, and her experience as a woman in the military. Her campaign spent $383,000 on that ad over the past week.

Image
Credit…Erik Branch for The New York Times

The primary election to face off against Mr. McConnell, the Senate majority leader, in Kentucky has been drawing national interest, as much for Mr. Booker’s sudden rise as for the harsh realities wrought by voting during the coronavirus pandemic. Fewer than 200 polling places will be open on Tuesday, a drastic reduction from the 3,700 locations that are often used in a typical election year. Louisville, the biggest city in the state, will have only one location open on Tuesday.

National politicians like Hillary Clinton and Stacey Abrams have decried the reduction of polling locations as voter suppression, accusations that have been joined by celebrities like LeBron James and Ava DuVernay.

But the state, under the leadership of Democratic Gov. Andy Beshear, vastly expanded vote by mail, and officials are hoping that big early numbers will help alleviate lines on Tuesday. Large counties like Jefferson, which is home to Louisville, and Fayette, home to Lexington, are seeing record-setting ballot requests that would surpass primary turnouts from previous elections, state officials have said.

But as has been the case in states that have already conducted primaries amid the pandemic, a surge in absentee and mail-in ballots doesn’t always lower in-person turnout.

Ben Self, the chair of the Kentucky Democratic Party, praised the governor’s efforts to expand vote by mail, saying that the likely record turnout for the primary “speaks to the fact that we’ve made it a lot easier to vote by mail.” But, he acknowledged, Tuesday could still bring issues.

“I think there is absolutely going to be lines,” Mr. Self said. “There could be a huge problem tomorrow. We’re going to watch it really closely, and work to alleviate those problems.” The state party was amassing water and making sure adequate bathrooms were available at polling locations.

Mr. Booker has been fund-raising on the potential voting problems, creating a “Voter Bus Fund” that is “organizing buses to help transport voters.”

All told, Ms. McGrath has outspent Mr. Booker by nearly 10-to-1 on television, devoting roughly $11.1 million compared with $1.1 million for Mr. Booker, though that advantage has been cut in half in the campaign’s final week.

On Facebook, Ms. McGrath had dominated as well, spending double, triple and one day, in early June, even 10 times as much on Facebook ads as Mr. Booker.

But that dynamic has been flipped as the primary has approached. On June 12, for instance, Mr. Booker spent more than $25,179 on the platform, compared with Ms. McGrath’s $16,406.

Since then, he has been the one doubling, tripling and quadrupling her spending. In the nine most recent days available, Mr. Booker had spent $544,453 on Facebook, compared with Ms. McGrath’s $184,803.

He was spending heavily nationally as he gained traction with small donors but also heavily in Kentucky, where he has out-advertised Ms. McGrath in recent days.

Shane Goldmacher and Jonathan Martin contributed reporting.