WEST PALM BEACH, Fla. — President Donald Trump defended a decision that would bar foreign nationals who had recently visited China from entering the United States as his administration continued to assess the growing threat of a coronavirus outbreak.

Sitting with the Fox News personality Sean Hannity, Trump used a roughly nine-minute interview taped on Saturday evening at Mar-a-Lago, his private club in Florida, and broadcast on Sunday as an opportunity to condense his usual rally-speak into Super Bowl pregame chatter. The topics included the virus, his impeachment and quick-paced insults of his potential 2020 rivals.

“We pretty much shut it down coming in from China,” Trump said of the coronavirus. “But we can’t have thousands of people coming in who may have this problem, the coronavirus. We’re going to see what happens, but we did shut it down, yes.”

He said his administration was offering the Chinese “tremendous help” to contain the spread of the virus. On Sunday afternoon, the administration put into effect a rule that would also essentially quarantine American travelers who had visited China within the past two weeks, diverting them to seven airports “to implement enhanced screening procedures,” according to guidelines issued Sunday by the Department of Homeland Security.

There have been seven confirmed coronavirus cases in the United States, but no deaths.

Earlier in the day, Robert C. O’Brien, Trump’s national security adviser, appeared on television to advise Americans that there was “no reason to panic” about the spread of the virus. Indeed, during his Fox sit-down, both Trump and his interviewer seemed more interested in allowing the president to focus on his grievances over impeachment and his reelection effort rather than elaborate on a global public health crisis.

“It’s been very unfair from the day I won,” Trump said. “Mostly it was unfair to my family.”

He derided the impeachment effort as “a hoax” and said he had not thought to delay his annual State of the Union address before the culmination this week of his Senate trial — an expected acquittal that Hannity framed as a “fait accompli.”

Trump then spent a large part of the interview insulting a slate of potential Democratic rivals. He and Hannity played a lightning round where Hannity invited the president to say whatever came to mind about Democratic presidential candidates, including former Vice President Joe Biden, Sen. Elizabeth Warren of Massachusetts, Sen. Bernie Sanders of Vermont and Michael Bloomberg, the former mayor of New York.

Trump falsely called Sanders a “communist” and claimed that he had been married in Russia.

“I think of communism when I think of Bernie,” Trump said. “Didn’t he get married in Moscow?”

Sanders married in Burlington, Vermont, before traveling to the Soviet Union soon after, and the trip has been used as fodder by his critics as evidence that he has communist leanings.

At one point, Trump falsely claimed that Bloomberg had requested a “box” to stand on should he attend a Democratic debate, a comment that drew sharp rebukes from both Bloomberg and his spokeswoman, Julie Wood, who called the president a “pathological liar who lies about everything: his fake hair, his obesity and his spray-on tan.”

Trump also called House Speaker Nancy Pelosi, who oversaw the impeachment effort into his presidency, a “very confused, very nervous woman,” adding that Pelosi would not last in office: “I think the radical left is going to take over.”