MESA, Ariz.—Calling the rising number of undocumented immigrants entering the United States “like a war,” President Donald Trump framed the upcoming midterm elections in this border state as nothing short of an existential battle for the future of the nation, and potentially, his presidency.

“The Democrats don’t care what their extremist immigration agenda will do to your communities,” Trump told the crowd at the International Air Response Hangar, an open-air facility on the outskirts of the sprawling Phoenix metroplex. That platform, Trump said, “is going to totally bankrupt our country, because all the Democrats want is power.”

Under two enormous banners—PROMISES MADE and PROMISES KEPT—Trump told an audience of roughly 4,000 people that a Honduran migrant caravan, also roughly 4,000 people, would “break our laws, violate our borders, and overwhelm our nation” if it were to enter the United States.

“They’re fighting some bad people in that group,” Trump said, of the Mexican military. “You see the people come up and you listen to the fake news back there, and you’d think they’re all wonderful people! You got some bad people in those groups, you got some tough people in those group, and I’ll tell you what: This country does not want them .”

The president’s persistent focus on immigration throughout his 53-minute speech showed where he is placing his political bets less than three weeks before midterm elections that will decide control of Congress. Whereas speakers who introduced the president focused on tax cuts, strengthening the military, and electing down-ballot Republicans to state and federal office, Trump returned, again and again, to the rallying cry of immigration.

“Democrats want to throw your borders wide open to deadly drugs and endless gangs,” Trump said. “‘Come on in! Come on in!’”

“It is sick ,” Trump said, calling groups of undocumented immigrants pursued by Immigrations and Customs Enforcement “nests.”

The issue has been increasingly conspicuous as the president’s top priority in recent weeks, as the wave of Republican enthusiasm following the confirmation of Justice Brett Kavanaugh to the U.S. Supreme Court has somewhat ebbed. Support for the sweeping tax reform package, the president’s signature legislative achievement, has similarly slipped since its passage in late 2017, and nowadays is a better turnout mechanism for Democrats than for Republicans.

With his proposed wall along the U.S. southern border unbuilt and his most identifiable administrative response to immigration involving holding immigrant children in cages, Trump may see hitting the unrealized goals of his immigration agenda as the best motivator for base voters who, without Trump’s name on the ballot, might otherwise sit the midterm elections out.

“They don’t want us to have the wall,” Trump said of Democrats in Congress. “They will fight to the death because they don’t want the wall, but we started the wall anyway and we’re gonna get that done.”

The president clearly sees the issue as a winner, even more so than trade. Trump tweeted on Thursday that the “onslaught” of undocumented immigrants crossing into the United States from its southern border needed to be stopped by any means necessary. Immigration, he said, is “far more important to me, as President, than trade.” The president also threatened to kill the United States–Mexico–Canada Agreement, his tweaked revision of the North American Free Trade Agreement, if Mexico failed to halt illegal immigration into the United States.

The president even turned his ire towards legal immigration, lambasting chain migration, the visa lottery, and due process for asylum claims.

“It sounds so good, ‘chain migration,’ like right out of school, everyone comes together,” Trump said. “We need to allow people in based on merit.”

Although the majority of his rally was composed of reprises of classic hits about border walls, “fake news,” and locking former political opponents in jail, Trump also stumped for Rep. Martha McSally, who is in a tight race to replace outgoing Sen. Jeff Flake, a longtime Trump foe. Trump called McSally “a great woman—I’ll tell you, I know her well—a great woman. She’s smart, and she’s tough, and she’s brave, and she can fly an airplane better than anybody.”

“Martha’s opponent is a far-left extremist,” Trump said, referencing comments from the early 2000s where Sinema flippantly told a radio host that “she has no problems with Americans defecting from our country to join the Taliban.”

“This is what you want as your senator?” Trump asked the crowd. “I don’t think so.”

“A vote for Kyrsten Sinema is a wasted vote, but more importantly, it’s a dangerous vote.”

McSally, a Republican member of Congress with a moderate legislative track record who declined to endorse Trump ahead of the 2016 presidential election, emerged from a bruising primary with renewed Trumpist vigor. The former combat pilot hosted Trump earlier on Friday at Luke Air Force Base outside of Glendale, Arizona, where Trump lauded her as “brilliant and brave” and her opponent as “very, very strange.”

The hangar, packed to the rafters with fans of the president’s—more than the usual percentage kitted out in red “MAKE AMERICA GREAT AGAIN” baseball caps, perhaps to shield from the oppressively bright autumn Arizona sun—represented a radical change of scene from the president’s last rally in the Valley of the Sun. In August of last year, a rally at the Phoenix Convention Center ended in near-riots, as protesters threw rocks and bottles at law enforcement, who responded with tear gas.

The American Civil Liberties Union filed a lawsuit against Chief Jeri Williams of the Phoenix Police Department and the city of Phoenix, accusing the police of using excessive force against the protesters, and threatened a temporary restraining order if Trump were to try holding a rally downtown again.

“Having a rally in downtown Phoenix is quite a bit different than having something out on the outskirts of Maricopa County,” said Kathy Brody, legal director for the Arizona division of the ACLU.

The audience, most of whom had waited in a sun-baked queue for hours to enter the private air hangar, was ebulliently receptive—chants of “build the wall!” interrupted the president’s speech no fewer than three times.

“He’s the only guy who’s willing to actually do something on immigration,” Richard Guzman, a retiree in Sun City, told The Daily Beast. “Here in Arizona, people have been talking about it forever, but nobody’s actually done anything until Trump.”

Asked how his feelings on Trump’s proactive immigration agenda squared with the increase in illegal immigration under President Trump’s watch—an issue that sparked a reported Oval Office shouting match in recent days—Guzman blamed Democrats in Congress.