The dog was very busy.

He starred in a political ad that had to show the candidate’s good-natured warmth. But the ad also had to stave off an onslaught of racially motivated attacks without directly embroiling them, and to convey to white voters in Georgia that the black pastor who ran the Ebenezer Baptist Church could represent them.

Of course, Alvin the Beagle couldn’t have known about it when he was walking with Rev. Raphael Warnock last fall when a film crew was recording their time together in a neighborhood outside of Atlanta.

Pulling a Mr. Warnock in a puffer vest for an idealized suburban stroll – bright sunshine, picket fence, an American flag – Alvin appeared in several of Mr. Warnock’s commercials fighting his Republican opponent in the recent Georgia Senate runoff .

Perhaps at its most famous spot, Mr. Warnock, a Democrat, throws a plastic bag of Alvin’s feces in the trash and compares it to his rival’s increasingly caustic ads. The Beagle barks in agreement and when Mr. Warnock explains that “we” – he and Alvin – approve of the news, the dog licks its goatee healthy.

“The entire ad screams that I’m a black candidate who whites shouldn’t be afraid of,” said Hakeem Jefferson, a Stanford political science professor who studies race, stigma and politics in America.

On Wednesday, Mr Warnock became the first black Senator from Georgia after the Democrats swept both Senate seats in the runoff elections. The double victories gave President Biden and his chances of implementing his agenda, democratic control over the chamber and an enormous boost.

While there isn’t a single factor responsible for such narrow victories – Mr Warnock won by less than 100,000 out of around 4.5 million votes and the other new Democratic Senator, Jon Ossoff, won by even fewer – there is a bipartisan agreement That the Beagle played an outsize role in breaking the clutter in two competitions that broke every Senate spending record.

“The puppy ad got people talking,” said Brian C. Robinson, a Georgia-based Republican strategist. “It made it harder to caricature him because they humanized him.”

At the end of the campaign, the helpers from Warnock saw that their internal surveys showed dog warnings, supporters lifted their own puppies at solidarity rallies and put home-made beagle-themed signs in the front gardens. They even started selling Puppies 4 Warnock merchandise.

All of this would probably surprise Alvin. After all, he wasn’t even Mr. Warnock’s dog.

Before the November 3 election, two Republicans, Senator Kelly Loeffler and Rep. Doug Collins, bled each other in a race to the right as they pledged allegiance to President Trump.

Mr. Warnock found himself on a glide path to the drains, and had the rare opportunity to do months of uninterrupted introductory advertising about himself.

The 51-year-old pastor had taken for granted on camera, and his campaign would film him speaking directly to audiences in much of his ads. But the Warnock team also knew that the pastor’s two decades of sometimes fiery rhetoric in the pulpit would lead to potentially devastating attacks.

Racial politics was inevitable. In addition to being a black candidate, Mr. Warnock was the pastor of Ebenezer Baptist Church, the spiritual home of Martin Luther King Jr., and political scientists and strategists emphasized that he faced Mrs. Loeffler with a unique challenge: against a white woman in the South.

“He knew he would be perceived as a highly raced candidate,” said Andra Gillespie, professor of political science at Emory University in Georgia and author of several books on race and politics. A key question for his campaign was she said, “Can you be racially transcendent and the pastor of arguably the most prominent black church in America?”

The Beagle spots were the brainchild of Adam Magnus, the lead admaker of the Warnock campaign, who wanted to use humor to find a way to vaccinate Mr. Warnock against explicit and implicit attacks. First he had to call the pastor. “I want to make sure you like dogs,” he recalled.

Mr. Warnock said he did – he had previously owned dogs (Comet, Cupid, and Brenal – all mutt), though not currently – and was playing a game for a puppy-themed commercial. Next, Mr Magnus had to cast a star pooch that he eventually found from a Georgia supporter whose name the campaign refused to reveal.

There has been some discussion that the Beagle – the type of breed that “we psychologically associate with whites,” as Dr. Jefferson put it – another subtle but deliberate effort was to explode racial stereotypes. Mr. Magnus said the reality was more mundane: “The dog had to be very cute, relatable, and he had to be able to hold the dog.”

A take of Alvin in Mr. Warnock’s arms would be the punchline.

“Get ready, Georgia, the negative attacks are coming,” the contestant said, predicting cutting back on everything from eating pizza with a knife and fork to hating puppies.

“And by the way, I love puppies,” he added, rocking Alvin.

It was Mr. Warnock’s opening ad of the drains, and it immediately went viral online.

Mr Warnock is not the first candidate to proclaim love for puppies in a preventive act of political self-defense. In 2006, another black candidate running for the Maryland Senate, Michael Steele, a Republican, showed an ad with his own saying essentially exactly the same thing.

Mr Steele, who said he was “honored by the tribute” in the Warnock spot, said his campaign had not consciously considered racial prejudice in creating his ad, but he saw clear efforts by Mr Warnock’s campaign to address racial prejudice disarm. “He’s making a statement in response to the president that black people are coming into your neighborhood,” said Steele. “We already live there.”

The Warnock team knew that getting to the Senate would require a complex and fragile multiracial coalition. The party needed to simultaneously mobilize black voters on a turnout close to that of a presidential election, while also targeting suburban white voters who split from the GOP last November to make Mr Biden the first Democratic presidential candidate since 1992 who won the state.

There is a rough rule of thumb for Georgia Democrats to win: you need 30 percent of the electorate to be black and about 30 percent of the white vote to win.

“If you are trying to make history in the South, and if you are trying to elect an African American pastor for an election that you know you need white voters, you must be doing all you can with your resources to get promotional strategy making white voters comfortable, ”said Chip Lake, a Georgia Republican strategist who is white and has worked for Mr. Collins.

Or as Jessica Byrd, a Black Democrat strategist in Georgia put it, “I don’t think I’ve spent a day in the past five years not thinking about how white people will see black candidates.”

Dr. Gillespie and other political scientists refer to efforts to make black candidates more acceptable to white voters “deracialization,” and Alvin the Beagle is a case study of its success.

“The point of deracialization is not to wake up black voters,” said Dr. Gillespie. “It’s supposed to reassure white voters.” In Mr. Warnock’s case, she did not avoid dealing directly with racial justice, as some previous candidates did. He simply and deftly added a suburban puppy.

Given the popularity of the first Beagle ad, Mr Magnus knew he would be returning to Alvin. But how? It had to be humorous, he decided, and it had to repeat the theme of rejecting Ms. Loeffler’s attacks, including the misleading quotation of Mr. Warnock as “Damn America” ​​(he quoted someone else) and her attacking as a Marxist the “anti-American” Celebrated hatred “.

The second Alvin shoot on the scene where Americana leaked lasted about four hours. And at one point, Mr. Magnus crouched behind a tree trying to persuade Alvin to turn on the cue. And Alvin wasn’t asked to do more than his performance on camera: the bag that was thrown in the trash was full of gravel. .

They ran the ad right before Thanksgiving, including reserving the annual National Dog Show.

Online, the Beagle spot rose to three million views within hours and to five million in one day.

Republicans and Democrats in the state were amazed at the effectiveness of the advertising campaign. “I know a lot of people who didn’t vote for Raphael Warnock but didn’t like or despise him,” said Mr. Lake.

Dr. Jefferson, the Stanford professor, said Mr Warnock’s continued sympathy was all the more impressive now that “his opponent casts all this vitriolic – dare I say racist – criticism aimed at revealing his blackness and otherness towards the electorate Highlight Georgia. ” Mr. Warnock countered with “that cute little dog” and a landscape that evoked a “white aesthetic”.

However improbable it may be, said Dr. Jefferson, objects – buffer vests, picket fences, beagles, suburbs – have racial associations: “It’s the same as a pumpkin spice latte.”

When the campaign commissioned its next poll following this ad, it included an open-ended question to see what voters thought of Mr. Warnock. Mike Bocian, the pollster, made a word cloud of the answers and couldn’t believe the results.

“I saw ‘Puppy’ and I saw ‘Dog’ and I saw ‘Poop’,” he said. “That’s crazy.”

Alvin had broken through in the middle of the two most expensive Senate races in American history.

The race remained tied to internal polls until the end. But Mr Bocian couldn’t help but notice that Mr Warnock had taken a two-point lead after being tied in his previous poll. “You can never be sure of causality,” his voice fell silent.

On January 5th, Mr Warnock won by exactly two percentage points.

Democrats credited a number of factors when they swore in Mr. Warnock on Wednesday. Few believe that they would have won without years of grassroots organization from black leaders. Or without the Republican feud fueled by Mr. Trump.

Alvin appeared once in the final days of the race to pull Mr. Warnock across the finish line in a beige zip-up sweater. As they strolled through another suburb, more dogs of all breeds joined in.

“It was a symbol of how he had carried out his entire campaign,” said Lake. The Republican strategist, himself a proud dog lover, was stunned to learn that Alvin was not Mr. Warnock’s dog.

“You could have fooled me!” he cried. “It looked like he and this beagle had a bond!”