Bernie Sanders holds a campaign rally in Boise, Idaho, this week. (Brian Losness/Reuters)

SAN DIEGO — Democratic presidential hopeful Bernie Sanders continued to maintain Wednesday that he has “a path toward victory” against Hillary Clinton but shared part of his reasoning for staying in the race regardless.

The senator from Vermont said that his goal is to defeat the Republican nominee in November and suggested that a 50-state Democratic contest will help with that task.

“The way you do that is to generate a lot of grass-roots enthusiasm, and the way you generate grass-roots enthusiasm is to have real debates on the real issues facing the American people and campaign in every state in this country,” Sanders told reporters in this city, where he held a large-scale rally Tuesday night. “That’s how you bring people together.”

Sanders cited the long lines to participate Tuesday night in Idaho and Utah, the two caucus states where he scored decisive wins against Clinton.

“Those people will vote in November,” he said. “It is absolutely essential that we contest every state in this country.”

Sanders’s assessment came the morning after he lost to Clinton in Arizona, 58 percent to 40 percent, but walked away with nearly 80 percent of the vote in Idaho and Utah.

Sanders two lopsided victories netted him more delegates than Clinton on Tuesday, but her lead is still formidable. Among pledged delegates needed for the nomination, the former secretary of state leads 1,214 to 911, according to an Associated Press tally. She also has a commanding advantage among the Democratic elected officials and other party leaders known as “superdelegates.”

Sanders told reporters at a hotel here that he thought he had “an extraordinary night” on Tuesday and also cited a victory over Clinton announced earlier this week in a primary consisting of Americans living abroad.

“We have closed the delegate gap by some 25 delegates in the last week,” he said.

Asked about his path ahead, Sanders cited upcoming contests on Saturday that he said he could win in Washington state, Alaska and Hawaii, as well as primaries down the road in California and New York, the two largest states in the nation.

“We are in this thing to the end,” Sanders said. “Why in God’s name would we not give the people of New York state and California the right to determine and voice their opinion as to who the Democratic nominee would be? I mean, it’s absurd. Of course, we would.”

He was also critical of Arizona election officials for the hours-long backups that resulted at some polling stations on Tuesday.

“Whatever the cause of that problem is, people in the United states of America should not have to wait five hours to vote,” Sanders said. “What happened yesterday in Arizona is a disgrace.”