Republican Senator Pat Toomey’s first ad of his hotly contested re-election race in Pennsylvania was all about guns.

“I’ve seen firsthand the courage that Senator Pat Toomey has shown to stand up and do what’s right,” says Nancy Grogan, a self-described “advocate for commonsense gun policy,” in a distinctive Delaware Valley accent. Cut to Toomey, looking concerned and determined, talking to parents while they push their kids on swings at a playground. A narrator reminds voters that the Philadelphia Daily News called his co-sponsorship of a bipartisan background check expansion bill following the Sandy Hook Elementary school shooting “a profile in political courage.”

The spot, which first aired in March, ends with Grogan delivering the kicker to other concerned moms: “On gun safety, he gets it.”

In Toomey, Pennsylvania voters have something of a unicorn: a Republican who has bucked party orthodoxy by supporting tighter gun laws, and isn’t afraid to talk about it. Whether that approach helps him keep his job may have big implications both for national gun politics and the prospects of reformers’ top policy goal. Even with Democrats increasingly unified in their embrace of gun violence prevention, it’s likely to take the filibuster-proof support of 60 senators to muscle through new background check requirements. One way to get there would be to demonstrate to Toomey’s fellow Republicans that having the National Rifle Association drop your grade — as it did to Toomey last month, slicing his former A rating to a C-, can actually be advantageous for swing state candidates.

With polls showing Toomey in a close race with his Democratic challenger, Katie McGinty, national gun violence prevention groups are aggressively boosting his candidacy in the hope of sending just that message. Americans for Responsible Solutions, a gun-reform group founded by former congresswoman Gabby Giffords, has endorsed his reelection, and a Super PAC funded by former New York City Mayor Michael Bloomberg has shelled out $2.3 million on the race.

“I think they realize that while they don’t agree with the senator one hundred percent of the time, it’s important for people who care about this issue to have thoughtful Republicans who are willing to work across the aisle,” says Mark Harris, a strategist for Toomey.

For years, Democratic candidates who favor stronger firearm regulations have invited reporters hunting (or assembled AR-15s blindfolded) to signal to gun-owning voters that they are no liberal gun-grabbers. Toomey is doing the dance in reverse. On other high-profile issues, he is a traditional conservative. Elected to the Senate amid the tea party wave of 2010, he is staunchly pro-life and considers the Affordable Care Act to be bad for patients, doctors, and “our economy.” As the former president of the Club for Growth, a conservative group focused on cutting taxes, he’s advocated for eliminating all taxes on corporations.

Toomey’s first Senate reelection bid also happens to have fallen in a bizarre election year where Republicans are scrambling to distance themselves from their presidential nominee.

They want to present him, or position him, as a softer voice among conservatives,” says Charlie Gerow, a longtime GOP strategist in the state, to make him “acceptable to moderate voters, particularly in the Philadelphia suburbs.”

To judge by opinion surveys, supporting extending background checks to private gun sales and transfers does not qualify a politician as a maverick: The policy is supported by 85 percent of Pennsylvania voters and 80 percent of its Republicans, according to a June survey by Public Policy Polling, a firm that works mostly with progressive candidates and causes. The finding is in line with national polls.

But other electoral math puts Toomey on a tightrope. Voter data shows that Republican candidates in Pennsylvania start with a smaller base than their Democratic opponents. Even as Toomey uses his position on guns to court the state’s projected 187,000 swing voters, he can’t afford to lose ground by turning off the segment of GOP voters who remain opposed to tighter gun restrictions.

In September, Toomey made an appearance at a Veterans of Foreign Wars hall in the small Philadelphia suburb of Folsom, in Democratic-leaning Delaware County. Outside the event, he pitched himself simultaneously as a lawmaker whom gun owners had no reason to fear, and one that moderate voters could believe in.

The Second Amendment is an important constitutional right for law-abiding citizens. And I am not going to infringe on the freedom of law-abiding citizens,” Toomey told The Trace in a brief interview. “At the same time, there are a lot of people that don’t have that constitutional right, because of their criminality, or because of a history of mental issues, and I’m going to work as hard as I can to make it as hard as possible for those people to obtain firearms. I think that’s the right solution, is to focus on the people who shouldn’t have guns in the first place. And I have consistently led that fight.”

Kathy Lawless, 67, was one of the voters at the VFW. Toomey’s stance on guns, she said, is “one of the pros in his line.”

The NRA, which dropped $1.4 million to help Toomey get elected to the Senate six years ago, has spent no money in the Pennsylvania Senate race this time around. But local gun groups have not been hesitant to brand Toomey a turncoat, with one categorizing him as the “lesser of two evils.” American Gun Owners Alliance, a northeastern Pennsylvania group, is actively encouraging its members not to vote for Toomey. Its president has even suggested that McGinty could be a better option because, as a first-term senator, she would have less sway than a second-term Toomey, whom they view as an instrument of their gun-reform foes.

The McGinty camp itself has hit Toomey for not going far enough. Unlike Toomey, the Democrat backs bans on assault weapons and high capacity magazines, positions that have helped her earn the endorsements of a national LGBT anti-gun violence organization and the local group CeaseFire Pennsylvania. In an ad, she paints Toomey as an NRA stooge. McGinty’s communications director, Sean Coit, says the senator is manipulating voters. “He is pretending to be serious about gun safety when the only time he’s actually taken a stand for gun safety was three years ago.”

This summer, as the gun debate raged on Capitol Hill following the Pulse nightclub massacre in Orlando, Toomey seized the chance to craft compromise on the so-called “terror gap,” a loophole in the federal background check system that allows people on terrorist watchlists to legally purchase guns. With Democrats and Republicans gridlocked over competing legislation to bar firearms sales to potential terrorists, the Wall Street Journal reported that Toomey was working with Everytown for Gun Safety on an alternative measure. (Everytown provides financial support to The Trace.) Toomey’s proposal never gained traction, but he threw his support behind a different bipartisan plan put together by Maine Republican Susan Collins.

“When we had a debate this summer about keeping terrorists from buying firearms, I supported three different versions of that to try to find common ground,” Toomey said in a faceoff with McGinty on October 17.

For Toomey’s campaign, the hope is that swing voters will not dwell on side-by-side comparisons of the candidate’s gun positions, and instead see in him the dealmaker they cannot quite imagine Donald Trump turning out to be.

“Washington is broken and dysfunctional, and [gun reform] is a good example of Senator Toomey being someone who’s trying to fix that problem,” says Harris, the Toomey strategist. “For us … it’s about making sure that we’re telling the story about Pat Toomey’s bipartisan leadership.”

At the Folsom campaign stop, Janet Copriviza, 60, said she hasn’t decided whom she’ll vote for next month, but appreciated that the senator crossed party lines to try to do something about an important issue. “I think he’s got guts. I applaud him for that.” To her, Toomey’s stance on guns “definitely” makes him a more appealing candidate — especially when compared to the Republican at the top of the ticket. “I just wish we didn’t have Trump running,” she said.

[Photo: Tom Williams/CQ Roll Call via AP Images]