WILDWOOD — President Donald Trump declared Tuesday that he is “creating jobs and killing terrorists” while Democrats are “obsessed with demented hoaxes” during a campaign rally at the New Jersey Shore as his impeachment trial entered a potentially perilous new phase.

“Which is worse,” Trump queried thousands of supporters crowded inside the Wildwoods Convention Center, “the impeachment hoax or the witch hunt from Russia?”

The rally offered Trump a respite from the impeachment drama and reports that his former national security adviser, John Bolton, has said in a book that the president had conditioned hundreds of millions of dollars in military aid to Ukraine on that country’s willingness to investigate Democrats. That has raised the prospect that enough Senate Republicans will join with Democrats to compel Bolton and other witnesses to testify.

Just days before the Iowa caucuses begin the Democratic presidential nominating contest, Trump made his case for reelection, boasting of the lowest unemployment rate in decades, his new trade deal with Mexico and Canada, and the lethal drone strike he ordered on Iranian Gen. Qassem Soleimani.

As he often does, Trump bashed the news media and railed against so-called sanctuary cities that protect undocumented immigrants. He mocked the “Green New Deal” energy plan: “You don’t have too many cows in Wildwood, but if you do, they’re gone,” he said.

He also tried to make headway on an issue that helped Democrats take control of the House in 2018: health care. Trump blasted Sen. Bernie Sanders’ Medicare for All plan, noting it would abolish private insurance and saying it would crush the economy.

“We’re making health care better and much, much cheaper," Trump said. "We are protecting people with preexisting conditions, and we always will.” The president unsuccessfully tried to repeal the Affordable Care Act — which protects people from being charged higher prices because of preexisting medical conditions — and his administration has since declined to defend the law in court against a lawsuit that could gut it.

And he shared a stage with Rep. Jeff Van Drew, the local congressman who shocked Washington last month when he split with the Democratic Party over impeachment, announcing he would seek reelection as a Republican and pledging his “undying support” to Trump.

“Jeff had the guts to defy the left-wing fanatics in his own party,” Trump said.

Police said earlier Tuesday that they expected to let about 8,500 people into the rally, many of whom had camped out overnight.

If the dominant mood for much of the day was celebratory, the nation’s divisions also were on full display. “This is what democracy looks like!” anti-Trump protesters shouted in a parking lot nearby.

From the boardwalk above them, Trump fans jeered.

“Where’s Hunter?” they yelled, reprising a favorite Trump attack line on Hunter Biden, son of former Vice President Joe Biden. Trump’s interest in Hunter Biden’s seat on the board of a Ukrainian gas company during the Obama administration helped lead the president down the road to impeachment.

Air Force One landed a little after 6 p.m. at Atlantic City International Airport, with Van Drew and former New Jersey Gov. Chris Christie aboard. The president boarded Marine One for the trip to a landing zone at Cape May County Airport.

Van Drew hopes Trump’s rally in his congressional district will help him with conservatives in his new party.

Some local Republicans have been skeptical of Van Drew, who represented parts of South Jersey as a Democratic state lawmaker from 2002 until he was elected to the House in 2018. But a leading candidate in the GOP primary endorsed Van Drew on Monday and said he’d run in another district.

“Are we going to allow ourselves just to be like any nation in the world, or are we going to keep America great?” Van Drew said to cheers Tuesday.

Local officials welcomed the campaign rally as a jolt to the Shore economy, which relies heavily on summer tourism. By Tuesday afternoon, the boardwalk area had turned into a pop-up Make America Great Again festival, with Trump merchandise just about everywhere.

Rocky Granata said he has traveled the country in an RV decked out in Trump flags and banners for nearly four years. “For the last 42 months,” he said, “all I do is Trump every day.” The Brooklyn native returned to New Jersey, where he lived for 40 years, to sell T-shirts and hats.

Motels reported being booked, and bars and restaurants near the boardwalk filled during the afternoon with Trump diehards. Blocks from the boardwalk, the Bolero Resort cued up Fox News’ coverage of the impeachment trial on a projector. Drink specials included a “Russian Collusion” and “Moscow Mueller.”

By midday, the line to enter the convention center filled the chutes in the arena’s parking lot and snaked out and around several blocks. Southern rock played on a loop.

Thousands lined the streets, chanting, “Trump! Trump!” and “USA! USA!” as the president’s motorcade pulled up to the convention center just before 7 p.m. Many of those unable to get inside watched the rally on a jumbo TV.

Not everyone was happy. Newly elected Wildwood Mayor Pete Byron, a Democrat, said in an interview that Van Drew informed him he was not welcome. Former Mayor Ernie Troiano, a Trump acolyte, was given a VIP ticket.

“I’ve been informed that Congressmen Van Drew and the president are upset with the fact that I said I think the city should be reimbursed” for rally expenses, Byron said.

Byron said he told Van Drew he had shown respect for the rally, and that “you should show the same respect to me as the mayor.... It shouldn’t be about, ‘I’m a Democrat or Republican.’”

New Jersey may seem like an unlikely destination for a Trump rally — Hillary Clinton carried the reliably blue state by 14 percentage points in 2016 — but the president owns multiple properties in the state. Wildwood is about an hour’s drive south of Atlantic City, where four Trump casinos went bankrupt.

Staff writers Ellie Rushing and Craig R. McCoy contributed to this article.