IN DOUGLAS, ARIZ. The congresswoman's grueling path to reelection took her from her Tucson base across the barren high desert, through an empty expanse of tumbleweed and mesquite trees, to this dusty town at the Mexican border that has come to symbolize the tinderbox of Arizona politics.

Rep. Gabrielle Giffords returned here on a sweltering day last June to gather footage for her campaign advertisements. A moderate Democrat in a classic swing district, she walked a main street where American flags hang outside shoe stores and barbershops. A voice-over emphasized her strengths: independence . . . courage . . . integrity.

With the camera rolling, a man stormed out of the Gadsden Hotel, a historic landmark. He screamed that Giffords was about to get "thrown out" of office, creating such a scene that police intervened.

"He began viciously, verbally attacking Gabby," said Jason Ralston, Giffords's Washington-based consultant who was directing the action. "I've never seen anything like it."

The man channeled his anger toward Giffords, but this was about much more than a lone congresswoman. He seemed to give voice to the long-simmering frustrations and passions in southern Arizona that boiled over during Giffords's hard-fought 2010 campaign.

Pitched emotions - centered on the issues of immigration, health care and the economy - have fueled an atmosphere here that encourages vitriol, according to interviews with more than two dozen state political leaders and residents. An anti-Washington sentiment has flourished as people blame their elected leaders, not just for failing to fix problems but for passing laws that only add to the mess.

The atmosphere created a sense of foreboding long before the Jan. 8 massacre at a Tucson strip mall where Giffords was meeting with constituents. Since the shootings, the co-founder of the Tucson Tea Party has endured death threats and hate mail that required law enforcement assistance, including a verbal threat made Saturday at a community gathering that included one of the shooting survivors.

A new Facebook page - Tea Party Tucson Massacre - has cropped up, blaming the tea party for the deaths of the six people, including a 9-year-old girl. On Friday, a new image appeared mocking the tactics of Republican Sarah Palin, the former Alaska governor and vice-presidential candidate, who targeted Giffords's district during the election with a map marked with cross hairs. (A Palin aide said the image was intended to represent surveyors' marks.) The image of a T-shirt on the site shows the marks plastered atop Palin's face.

Trent Humphries, the tea party leader, said that because of the rancor, he was urged to stay away from memorial services and funerals honoring the shooting victims. "The police have told me that I had better not go to any large events right now," he said. "It wouldn't be safe."

Although the accused killer, Jared Lee Loughner, focused on Giffords as early as 2007, no evidence has emerged that he did so because of a specific political issue. He was a registered independent who apparently harbored anger toward the congresswoman for her answer to his question at an earlier constituent event.

But Giffords's district offers a case study of problems that have driven much of Arizona's politics to a boiling point. The 8th District is fiercely independent, much like its congresswoman, who mucked horse stalls as a child and rides motorcycles without a helmet. The Gunfight at the O.K. Corral took place midway between Tucson and the border at Tombstone, now a tourist trap - "The Town Too Tough to Die" - that resembles a Hollywood lot for some Wild West flick.

The immigration debate has raged here for years. Last March, an illegal immigrant allegedly shot and killed a prominent rancher, Robert Krentz, on his land outside of Douglas. The slaying provided some of the momentum for the state's immigration law last summer.

"Half of the arrests for illegal immigration between California and Texas are made in District 8, Gabby's district," said Michael McNulty, a Tucson lawyer who has chaired Giffords's campaigns since she first ran for the state legislature. "That had everyone on edge."

But some residents here said they have not felt the same urgency from their elected officials in Washington, who are too distant to see the impact that illegal immigration has on local crime rates, joblessness and overstretched public services.

"A lot of us are mad at Washington," Julius "Mac" Maklary, 73, said as he watched a football game Saturday in a smoke-filled American Legion lodge. He said he voted for Giffords but is still not satisfied with government. "Everybody got reelected, but what are they doing now? We've still got the same problems. We still have all these drug problems and illegal immigrants coming across," he said.

As she campaigned for reelection, Giffords knew immigration would be a huge constituent issue, her aides say. She emphasized border security but came under heated criticism for not backing a state effort to more aggressively identify and deport illegal immigrants.

But her top aides said they were taken aback when gun rhetoric escalated during the campaign.

"There was a lot of hostility and gun talk," said Rodd McLeod, Giffords's campaign manager. "And when you are campaigning, you are publicly advertising where you are going to be."

In August 2009, as the health-care debate ratcheted up, a protester brought a gun to one of Giffords's "Congress on Your Corner" events at a supermarket in Douglas. The man reportedly shouted disparaging words at Giffords and drew the attention of police after he dropped his firearm.

After Jesse Kelly won the Republican primary in the 8th District, the tea-party-backed candidate held a gun-shooting fundraiser. An ad promoting the event said: "Get on Target for Victory in November. Help remove Gabrielle Giffords from office. Shoot a fully automatic M16 with Jesse Kelly."

Kelly declined interview requests.

Giffords was not the only Arizona Democrat in Congress who felt threatened during the past year. In April, Rep. Raul M. Grijalva and his staff received multiple death threats and felt forced to temporarily shut his district offices in Tucson and the border town of Yuma. At that time, Giffords tried to appeal to Arizonans, saying, "Such acts only make it more difficult for us to resolve our differences. . . . Resorting to vandalism and threats to express political viewpoints is unacceptable."

Winning the district was a top priority for both parties, and in the campaign's final weeks, the sheer volume of anti-Giffords campaigning was inescapable, residents said.

Street signs saying "Giffords FORCED Obamacare on YOU" popped up at major intersections. Talk radio personality Garret Lewis devoted his three-hour show each day to Giffords, calling her a "puppet" of then-House Speaker Nancy Pelosi (D-Calif.) and accusing the Arizonan of "masquerading as a border conservative." At debates, angry spectators booed and shouted over Giffords and Kelly so loudly that the candidates sometimes could not be heard.

Thomas J. Volgy, a former Tucson mayor who teaches political science at the University of Arizona, said state politics was radically different when he was running for office two decades ago. During his 1987 mayoral race, Volgy, a Democrat, was expected to lose to the Republican incumbent, Schuyler Lininger. But things shifted in Volgy's favor after the state's GOP leadership denounced him for being a naturalized citizen.

It backfired. Volgy went from being down five percentage points to winning by between eight and nine points.

"Being negative and personal didn't work. People didn't like it," Volgy said. "Now we are in an era where people do nothing but denounce public officials for being scum and slime. It's hard for some people to differentiate between the good guys and the bad guys."

Kindy reported from Washington, Rucker from Douglas, Ariz. Staff writer Sari Horwitz in Tucson and research editor Alice Crites in Washington contributed to this report.