Maricopa County Sheriff Joe Arpaio talks with reporters and protesters in Phoenix in July 2010. (Darren Hauck/EPA)

— Arizona is the most diverse state holding a primary vote Tuesday, and one of the last opportunities for Sen. Bernie Sanders to show he has momentum to catch Hillary Clinton and whittle down her big lead in the Democratic presidential race.

Immigration is the main issue, and Clinton and Sanders have spent days sparring over who is more friendly to undocumented immigrants.

“We are a nation of immigrants and exiles,” Clinton said to huge applause Monday at a lively rally at a downtown high school with enrollment that is predominantly Hispanic.

Both candidates say that they would go far beyond what President Obama has done to curb deportations, using executive action to get around the will of Congress if needed.

“When I see people like Sheriff Arpaio and others who are treating fellow human beings with such disrespect, such contempt, it just makes my heart sink,” Clinton said.

The crowd booed loudly at the mention of Joe Arpaio, the immigration hard-liner from Maricopa County, Ariz., who is supporting Republican front-runner Donald Trump.

“We are better than that,” Clinton said.

Clinton’s single campaign stop in Arizona followed days of appearances by former president Bill Clinton and a long list of surrogates. Labor Secretary Thomas Perez, frequently mentioned as a potential Clinton vice-presidential pick, campaigned Monday on her behalf in the state and addressed the crowd at her rally here in both English and Spanish.

Sanders, the senator from Vermont, filled an outdoor amphitheater in Flagstaff, Ariz., on Monday night for a festive election-eve rally. He also had held three rallies in Arizona in three days late last week.

A victory in Arizona would signal that Sanders still has some fight left in him. Although he is greatly trailing Clinton in delegates needed to secure the nomination, Sanders’s campaign argues that he is poised for a comeback, with the second half of the nominating calendar looking more favorable to him than the first.

The first test of that proposition is Tuesday, when Arizona is the biggest prize, but Utah and Idaho also hold nominating contests. Sanders campaigned in all three states on Monday.

Voters in a trio of other states — Washington, Alaska and Hawaii — will have their say Saturday.

“Bernie thinks it is the beginning of his turnaround,” said Clinton spokesman Brian Fallon. “We think we are going to win. Showdown!”

Polling is very limited in Arizona, but the most recent statewide effort, two weeks ago, gave Clinton a 30-point edge. Both campaigns say the race is much tighter than that, but Clinton’s team is confident that she remains ahead.

A majority of Arizona voters cast their ballots early. Those results are tabulated as they come in but not announced until the polls close at 8 p.m. Tuesday.

Sanders’s campaign, which has fallen far behind Clinton’s in the delegate count, has told supporters that it is about to go on a winning streak and eventually catch the former secretary of state.

For Clinton, a solid win in Arizona would make a statement about her dominance in the Democratic race. Her chief pollster, Joel Benenson, asserted Monday that the race has shifted.

“Simply put, Hillary has won more votes than any other candidate in this race on either side of the aisle, including 2.5 million more votes than Senator Sanders,” he wrote on the online site Medium. “Nearly 1.3 million more people have voted for Hillary than for Donald Trump. Far from beating Trump, Senator Sanders is trailing him by more than a million votes.”

Apart from immigration, Clinton has been focusing on gun control in Arizona, including in a television ad featuring former congresswoman Gabrielle Giffords (D-Ariz.), who in 2011 was shot in an assassination attempt that left her with a severe brain injury. Giffords addressed Clinton’s rally Monday to chants of “Gab-by, Gab-by.”

“Hillary is tough,” Giffords said in a halting voice. “In the White House she will stand up to the gun lobby.”

In the past weeks, Sanders’s campaign has taken him to the Mexican border crossing at Nogales, Ariz., where he took a tour of the wall there with Rep. Raúl M. Grijalva (D-Ariz.), a leading supporter of his in the state. With television cameras in tow, Sanders talked with immigrants and vowed to do whatever he can as president to keep families together.

During a recent stop in Flagstaff, Sanders also sought to bolster his credentials with voters for whom immigration is a central issue. Sanders was introduced by Katherine Figueroa Bueno, a 12-year-old who said she saw television coverage of her undocumented parents being arrested by Arpaio when she was 9.

Upon taking the stage, Sanders praised her as “a young woman of extraordinary intelligence and extraordinary courage” who had used the story of her parents’ deportation to fight for justice.

“If elected president, we are going to pass comprehensive immigration reform and a path toward citizenship, whether Mr. Arpaio likes it or not,” Sanders vowed.

He accused Arpaio, whose county is the most populous in the state, of “outrageous and unconscionable” tactics in aggressively arresting undocumented immigrants and issued what sounded like a threat.

“It’s easy for bullies like Sheriff Joe Arpaio to pick on people who have no power,” Sanders said. “If I am elected president, the president of the United States does have power. So watch out, Joe!”

In an interview the following day with Fox News, Arpaio was dismissive of Sanders, saying, “I don’t worry, he’s never going to be president anyway.”

Clinton’s campaign and her allies, meanwhile, have been working to undermine Sanders on immigration by arguing that his record in Congress has been mixed at best.

In an op-ed piece displayed prominently in Saturday’s Arizona Republic, former Arizona congressman Ed Pastor, a Clinton supporter, wrote that he had served for years with Sanders, “and seemingly every time the Latino community had the most on the line, he stood across the aisle.”

Pastor cited some of Sanders’s votes that Clinton has brought up in recent debates: against a comprehensive immigration reform bill in 2007 championed by the late senator Ted Kennedy (D-Mass.) and in favor of a measure that gave cover to a private group known as the Minutemen that patrolled the U.S.-Mexican border and that critics derided as made up of racist vigilantes.

Sanders has said neither measure is reflective of his views on immigration, arguing for example that a major Latino group stood with him against the 2007 bill because of provisions on guest workers, whose conditions he said are “akin to slavery.” Sanders is also quick to point out that he voted for a more recent comprehensive immigration bill in 2013.