PRESCOTT, Ariz. — Martha McSally was speaking to a veterans group on Thursday about aggressive liberal politics when she suddenly shifted the conversation to Kyrsten Sinema, her Democratic opponent in the race for an open Senate seat here. “Speaking of treason,” she said, referring to Ms. Sinema, “her extreme views are out of step.”
It was a slightly awkward rejoinder. But it also appears to be Ms. McSally’s closing argument.
Ms. McSally, a Republican congresswoman, is employing an unusual tactic in the final stages of one of the most closely watched Senate races in the country, doubling down on a jarring claim she made in a debate this week: that Ms. Sinema’s response years ago to a radio host’s flip comment about joining the Taliban constituted a crime against the state.
Until two weeks ago, Ms. McSally seemed to be losing ground in her battle with Ms. Sinema, a Democratic House member from Phoenix, for the seat being vacated by the retiring Republican, Jeff Flake.
As Ms. McSally spent the summer duking it out in a nasty primary battle with Joe Arpaio, the firebrand former sheriff, and Kelli Ward, an ultraconservative osteopath, Ms. Sinema, with no real primary challenger, ran a series of gauzy ads focused on her impoverished childhood and congressional record of bipartisanship.
Since then, Ms. McSally has largely stayed in primary mode, sticking like taffy to President Trump — who won the state by a far smaller margin than Mitt Romney did in 2012 — and tossing barbs at Ms. Sinema, who has responded largely with the sunny disposition of a hotel clerk facing down a guest disputing a charge.
As Arizona voters begin early balloting, Ms. McSally, 52, is hauling in reinforcements: former President George W. Bush is hosting a fund-raiser for her on Friday in Scottsdale, and Mr. Trump plans to be in Mesa rallying Republican voters in the evening.
Polls that once showed Ms. Sinema with an advantage have tightened or even given a slight edge to Ms. McSally in recent days. A live poll by The New York Times Upshot department was showing a close race Friday night.
“Until last week, I definitely would have said Sinema was in the lead,” said Paul Bentz, a Phoenix political adviser and pollster. “Now things are tightening up.”
The race — which will deliver Arizona’s first female senator — is among the most expensive Senate contests in the country, with constant ads interrupting football games and radio sales pitches for scorpion removal services.
In recent days, Ms. McSally appears to have gained some footing by delving into Ms. Sinema’s past. Ms. McSally’s supporters surfaced an old photo of Ms. Sinema protesting the war in Iraq as a law student in 2002, and a video of her mocking her home state for being a “meth lab of democracy” while serving in the state legislature. They also unearthed a 2003 radio interview of Ms. Sinema expressing indifference — “I don’t care,” she said — to a radio host’s provocation about hypothetically joining the Taliban.
Ms. McSally, a former United States Air Force fighter pilot, seized upon the Taliban comment and charged in their debate this week that Ms. Sinema’s stance amounted to “treason,” a broadside so sharp it became national news.
“This is not just a choice between a protester and a patriot,” Ms. McSally said on Thursday at a meeting of the Republican Women of Prescott, noting her own multiple deployments with her “badass plane.” Ms. Sinema “is doing her classic liberal anti-military stuff,” she added.
Recalling her fallen colleagues in Afghanistan, Ms. McSally choked up. “It’s extremely personal,” she said.
Ms. Sinema has largely not taken the bait.
“Martha has chosen a very low road,” Ms. Sinema said at an event in Scottsdale this week with supporters. “That is her choice.” She insists she has a base across party lines: “People in Arizona know I share their values.”
This state seems to tolerate shape shifting. Senator John McCain, who died this year, moved to the right of his own long-held positions on issues like immigration in a tough primary one year, then voted with Democrats to preserve the health care law in another. (Mr. Flake declined to back down on his criticism of Mr. Trump and found himself in an unviable position.)
Ms. Sinema and Ms. McSally, who both represent swing districts, have done their own transforming. Ms. Sinema went from a fairly left-leaning partisan member of the state legislature to one of the most centrist Democrats in the House.
Ms. McSally, whose arm’s-length approach to Mr. Trump extended to not revealing if she voted for him, was also viewed as a moderate reflecting the complexion of her mixed district. But she has since morphed into a strong Trump supporter, though she said this week that she did not agree with Mr. Trump’s characterization of an adult film star as “horseface.”
Arizona, for decades a Republican stronghold, has trended toward purple slowly and steadily over the past decade, like a pair of white socks washed repeatedly in a color load.
Hispanics now make up 31 percent of the state’s population, and independent, issue-driven voters, many who have migrated from other states in recent years, have fueled the area’s growth.
Yet Democrats have largely failed to capitalize on the shifting demography. The party has not won a Senate seat since Dennis DeConcini’s last race in 1988 nor a statewide race of any kind since 2008, and actually lost ground in 2010.
Ms. Sinema, who was elected to the House in 2012, was widely viewed by both parties as the one best positioned to advance.
In Congress, she formed alliances with some of the most conservative Republicans — including Representative Trey Gowdy of South Carolina — and she has earned popularity with the state’s Republicans for her consistently moderate positions and constant outreach. She has voted with her Republican colleagues about 60 percent of the time.
She has declined to throw support behind liberal positions like the elimination of Immigration and Customs Enforcement, in contrast to the Democratic candidate for governor, David Garcia, an Arizona State professor who has fallen behind Gov. Doug Ducey. Her ads don’t even mention that she is a Democrat — because she is not “proud of parties,” she explained to an Arizona radio interviewer, adding, “I am a proud Arizonan.”
She has built an impressive coalition of Republicans in the state, causing Ms. McSally to note recently: “We’ve got some moderate Republicans who seemed to have drank Kyrsten Sinema’s Kool-Aid in the polling and we need to bring them back home.”
Ms. McSally’s ads and those of her supporters have been relentlessly negative and darkly accusative, which is a great primary play, but may hurt her with general election voters. “There are not enough voters for her to mobilize with that to win,” said Kim Fridkin, a political-science professor at Arizona State University.
But Ms. Sinema faces the traditional obstacles for Democrats in this state. Republicans continue to hold a registration and participation advantage even though independents remain a sizable portion of the electorate, and Ms. Sinema needs to woo some of them to win.
While Ms. McSally would likely not find traction with attacks on Ms. Sinema on issues like health care — the health care law has a great deal of support in the state, especially among older voters — Republicans have generally found national security a more effective line of attack. Indeed, like many Republicans this year, Ms. McSally has worked hard to square her position in favor of insurance companies covering pre-existing conditions with her vote for a bill that would have ended the practice.
The confirmation hearings for Justice Brett M. Kavanaugh have energized Republicans everywhere; his photo was front and center at the Republican Women of Prescott’s meeting here.
Ms. Sinema’s best hope at breaking the Democrat’s long losing streak in Arizona is to run up the numbers in Democratic pockets, minimize her losses in rural areas and win large swaths of Maricopa County, encompassing Phoenix, with the help of some of its Republicans.
“The biggest question with three weeks left in the election,” said Mr. Bentz, the pollster, “is who can close out their campaign with an effective appeal to independent and unaffiliated voters and Republican women to win.”