Democrat Ron Barber, left, and Republican Jesse Kelly laugh over a microphone malfunction during the opening remarks of a debate at the Tucson Jewish Community Center on May 23. (Kelly Presnell/Arizona Daily Star/AP)

Voters in southeastern Arizona will decide Tuesday whether to continue the legacy of former congresswoman Gabrielle Giffords (D) by electing a former aide who was among those injured with her in a tragic 2011 shooting or to punish President Obama for his handling of the economy by supporting a tea-party-backed Republican.

In a special election to fill the remaining six months of Giffords’s term, Democratic former aide Ron Barber is matched against Republican Jesse Kelly, a Marine veteran who narrowly lost to Giffords in a bitter 2010 showdown. A win by Barber would offer reassurance to Democrats that they can triumph in swing districts, while a Kelly victory would be the latest blow to Obama’s political standing in what has been a bad couple of weeks for him and could end the recent Democratic speculation that the president might be competitive in Arizona this fall.

In the final days of the contest, Barber emphasized his ties to Giffords, who appeared at campaign events with him over the weekend along with her husband, astronaut Mark Kelly.

“This is a little about closure,” Mark Kelly told supporters at a concert rally in Tucson. “This closure on Gabby’s career in Congress . . . I really, truly believe that this is this coming Tuesday.”

Jesse Kelly, 30, and his Republican allies have focused almost entirely on trying to link Barber to Obama, who is unpopular in the Tucson-based district, which has been a key battleground for his administration’s immigration policies.

“Ron Barber is helping Obama, but he’s hurting Arizona,” a narrator says in a commercial aired by the National Republican Congressional Committee. Sensing the chance to pick up a Democratic seat, the NRCC has spent nearly $900,000 to aid Kelly, about twice as much as its Democratic counterpart has spent on Barber. Super PACs have flooded the airwaves as well, bringing ads on the region’s TV stations to near-saturation levels.

Also on Tuesday, several other states will formally set their lineups in key Senate races. In Nevada, interim Sen. Dean Heller (R) and Rep. Shelley Berkley (D) are poised to officially claim their parties’ nominations to run for the seat vacated last year by John Ensign amid a sex-and-lobbying scandal. It is likely to be one of the most hotly contested Senate races in the nation, along with the contest in Virginia, where former senator George Allen (R) and former governor Timothy M. Kaine (D) are also expected to coast to their nominations Tuesday. In a state that leans Republican, former North Dakota attorney general Heidi Heitkamp (D) hopes to use Tuesday’s nomination to launch her upstart bid against Rep. Rick Berg (R).

In Maine, voters will decide which Republican and Democratic nominees to send up against the heavy favorite, popular former governor Angus King, who is running for Senate as an independent.

The Arizona special election, however, is the race that could provide the best window on the political climate heading into the fall.

Arizona’s 8th District, with hundreds of miles bordering Mexico, has been a central battleground in the past few elections. After a longtime Republican retired in 2006, Giffords won the seat by campaigning as a centrist Democrat. In 2010, after a spate of violence related to illegal immigration and drug trafficking near the border, Giffords took a staunch position on border security that helped her edge out Kelly by about 1 percent.

Barber, 66, served as Giffords’s top staffer in the district. He was with her at a “Congress on Your Corner” event at a Tucson supermarket in January 2011 when a troubled 22-year-old, Jared Lee Loughner, allegedly opened fire, shooting Giffords and Barber and 16 others. Six people died, including a federal judge and one of Giffords’s staffers.

Giffords has made what doctors consider a remarkable recovery, but she still has trouble speaking at length. She resigned in January, a year after the shootings, and Democrats convinced Barber that he was the best candidate to carry on in her place.

Barber and Kelly are also running for a full congressional term, for which they will probably be nominated in the regularly scheduled primary in August. That would set up a third showdown between the Giffords political team and Kelly in November.