President Trump’s sudden announcement that he would bar immigrants from entering the country could present a challenging proposition for probable Democratic nominee Joe Biden, potentially thrusting him back into a tug of war between a Democratic base firmly opposed to stricter border policies and more-moderate voters willing to consider them, particularly during an economic calamity.

Trump’s Monday night announcement injected new uncertainty into a contest already roiled by the public health crisis. Immigration has long been one of the most polarizing issues in politics, and a renewed national debate on the subject threatens to enhance partisan divisions less than seven months before the election.

Trump offered more details Tuesday, saying he would halt immigration to the United States for 60 days, a freeze that will prevent green-card recipients from moving to the country but will continue to allow temporary workers on nonimmigrant visas to enter.

Some Democrats expressed confidence that Trump’s move would be seen by voters as a diversion from more-pressing concerns.

“We always knew that Trump was going to focus on immigration and that was a battle that we were going to have to engage in,” said Rep. Filemon Vela (D-Tex.), an early supporter of Biden’s campaign. “But I think the public fears coronavirus a whole lot more than they do immigrants. So, I don’t think it’s anywhere near the winner politically that Trump and his surrogates think it is.”

But neither Biden nor his campaign commented on the immigration ban throughout the day Tuesday, a delay that suggested internal sensitivity about how to approach the matter.

“Rather than execute a swift and aggressive effort to ramp up testing, Donald Trump is tweeting incendiary rhetoric about immigrants in the hopes that he can distract everyone from the core truth: he’s moved too slowly to contain this virus, and we are all paying the price for it,” Biden said in a statement sent by his campaign nearly 21 hours after Trump announced his plan. The statement said that sending ­“inflammatory tweets” to hide Trump’s “glaring failures . . . helps no one.”

Over the past year, the former vice president has battled criticism from Latino activists and leaders who have complained about a lack of outreach from him amid their concerns about what they feel was an overly harsh deportation policy during President Barack Obama’s administration. Their alarms have created pressure for him to embrace more-liberal border policies.

At the same time, Biden is presenting himself as a moderate candidate who can win over swing voters in the more conservative suburbs and exurbs frustrated with Trump but not inclined to embrace ideas championed by some on the left, such as abolishing the Immigration and Customs Enforcement agency.

Trump effectively ran on a tough immigration policy in 2016, when he castigated Mexicans and Muslims, favoring a wall to keep out the former and a travel ban to keep out the latter. The same arguments fell flat in the 2018 midterm elections, when Democrats won back control of the House by focusing on health care and the economy; voters turned aside efforts to scare them with portrayals of Latinos as violent gang members and of caravans approaching the southern border from Latin America.

Trump’s Monday night tweet caught many by surprise.

“In light of the attack from the Invisible Enemy, as well as the need to protect the jobs of our GREAT American Citizens, I will be signing an Executive Order to temporarily suspend immigration into the United States!” he wrote.

Attorneys and senior Trump administration officials met Tuesday to work out the logistics and legal implications of the president's order, according to senior officials involved with the plans. “I will be issuing a temporary suspension of immigration into the United States,” Trump said during a White House briefing Tuesday.

The Trump campaign portrayed the move as one designed to protect Americans.

“President Trump’s immigration policy just makes sense as the United States fights the war against the coronavirus. He has two main goals: to protect the health and safety of Americans and to safeguard the economy,” Trump campaign spokesman Tim Murtaugh said in a statement. “At a time when our economy has been artificially interrupted by the virus, introducing more competition for jobs would worsen unemployment and depress wages.”

Some Republican strategists believe politically charged topics such as immigration that remind voters of their partisan affiliations accrue to the GOP’s benefit, particularly in conservative areas. Biden has argued that he would be able to pull some of those voters into his camp.

In 2018, Democrat Heidi Heitkamp lost her Senate seat in Republican North Dakota in the face of GOP attacks that, among other things, sought to portray her as an extremist on immigration and border security. In an interview Tuesday, Heitkamp said she felt Trump was again trying to cement support from his base. As for how the public would react, she said that remained unknown.

“Talk to me in September because whatever is happening in September is what is going to drive the dialogue,” said Heitkamp, who supports Biden.

One Democratic member of Congress, who spoke on the condition of anonymity to be candid, said Trump’s strategy could pose a challenge for Biden because of the president’s ability to distort facts, Biden’s struggles staying on message and the difficulty Biden could face balancing the demands of his party’s liberals and moderates.

Many Democrats have been hoping to use this fall the moderate strategy that won them the House. Party leaders see Biden, who has charted a moderate course in recent years, as an effective leader in that fight. Some had cringed last year as candidates whom Biden ultimately defeated competed to propose more and more liberal border policies.

But Biden has faced recent questions from activists and ­lawmakers about the Obama administration’s deportations. During a recent interview with Politico’s Playbook, Rep. Alexandria Ocasio-Cortez (D-N.Y.), a rising star on the left, said she wanted to see Biden “clarify and deepen” his stances on some issues. She mentioned immigration as an area where the party needed to find “a plan to improve.”

Biden’s campaign recognized similar demands when it released an immigration policy blueprint late last year saying the former vice president “understands the pain felt by every family across the U.S. that has had a loved one removed from the country, including under the Obama-Biden Administration, and he believes we must do better to uphold our laws humanely and preserve the dignity of immigrant families, refugees, and asylum seekers.”

Vela, the Texas congressman, defended Biden, saying that “to the extent that there were people in the Democratic Party that were concerned about Joe Biden’s immigration stance, I think he’s done a lot over the course of the last four months to talk to those folks and remind them that he’s really on their side.”

Trump’s decisions could also reverberate down the ballot, where a fierce battle for control of the Senate is underway. Democrats are defending just 12 seats, most in safely blue states, whereas Republicans have 23 on the ballot. Democrats have fielded competitive campaigns in swing states such as Arizona, Colorado, Maine and North Carolina, putting them within striking distance of netting the three seats they need to clinch control if Biden wins.

“I think it’s another diversion. The agencies don’t even know what it is. No one knows what it is,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said in an interview on CNN. He said the president should focus his energy on other elements of the pandemic. “What we really need is a focus on testing, a focus on contact tracing, so that we can open up again.”

Other Democrats seconded his view.

“It’s an effort to appeal to xenophobic parts of his base and will understandably seem to many Americans as using a public health crisis to revive his long-standing political effort,” said Sen. Richard Blumenthal (D-Conn.).

Former Democratic congressman Beto O’Rourke of Texas, a Biden supporter, took to Twitter to call it “an attempt to distract us from his total mismanagement” of the pandemic, but one that “will still have terrible consequences for America.” He warned, “We should take it seriously.”