The White House sought to tamp down speculation Monday that President Trump would fire the nation’s top epidemiologist in the middle of the pandemic, but concern over an Easter presidential retweet attacking Anthony S. Fauci continued to reverberate as many of the president’s allies and critics warned that such a move would be counterproductive.

Several administration officials, top lawmakers and public health experts expressed concern that Fauci could be sidelined or silenced in the critical days ahead as Trump makes decisions about whether to encourage Americans to return to normal economic and social activities.

On Monday, Trump dismissed those concerns as if he had not initially sparked them when he retweeted a message Sunday night that included the hashtag #FireFauci.

“Today I walk in and I hear I’m going to fire him,” Trump said during the White House daily press briefing. “I’m not firing. I think he’s a wonderful guy.”

But some Republicans took Trump’s post Sunday as a green light to ramp up attacks on Fauci, whom some of the president’s allies blame for the stay-at-home orders that have crippled much of the country’s economy.

The political debate over Fauci’s fate reflected Trump’s penchant for injecting uncertainty and drama into the federal government’s coronavirus response, in which Fauci has played key roles both publicly and privately. By elevating the prospect of his ouster or diminishment while the pandemic rages on, Trump cast Fauci as the latest beleaguered figure in a presidency marked by the abrupt ouster of dozens of officials from the FBI, the State Department, the intelligence community and elsewhere.

“I think controversy’s a good thing, not a bad thing,” Trump said Monday, addressing Fauci’s fate.

At the news briefing, Fauci appeared to back away from some of the comments about the coronavirus response that had drawn Trump’s scorn — describing his Sunday remarks to CNN as “a poor choice of words.” He was asked whether this was being done under pressure.

“Everything I do is voluntarily,” Fauci said as Trump looked on. “Please. Don’t even imply that.”

Fauci, who has been the nation’s top infectious-diseases official since 1984, is not a political appointee and is shielded by several layers of federal civil servant protections. He can’t be removed without cause and his dismissal would be subject to due process procedures.

But Fauci could be reassigned within the National Institutes of Health, officials said, or essentially pushed aside within the White House coronavirus task force and see his influence diminished.

During daily televised briefings and in media interviews, Fauci has occasionally broken with Trump by delivering a science-based message that undermines the president’s claims.

Trump retweeted a post on Sunday night from a former Republican congressional candidate, DeAnna Lorraine, who attacked Fauci over comments he made in a televised interview earlier in the day. Fauci told CNN’s “State of the Union” that a stronger early response to the outbreak by the administration “could have saved lives,” adding that there was “a lot of pushback about shutting things down” before the virus began spreading rapidly throughout American cities.

“Time to #FireFauci,” Lorraine said in the tweet that Trump amplified to his 76 million followers.

Trump said Monday that the retweet was just “somebody’s opinion” and “a person’s view” that did not align with his own. He expressed no regret about amplifying the #FireFauci hashtag, saying he did so knowingly.

The White House spent much of Monday trying to downplay the tweet and shift blame.

“This media chatter is ridiculous — President Trump is not firing Dr. Fauci,” White House spokesman Hogan Gidley said in a statement on Monday.

But the retweet set off a rush to defend Fauci that included Republican and Democratic lawmakers, while also unleashing a fresh round of attacks by some of Trump’s most ardent backers on social media.

“In this particular crisis, he is like the north star for America in terms of finding our way through this dangerous journey,” said Sen. Richard J. Durbin (D-Ill.), the ­second-ranking Democratic senator. “He’s maintained his credibility and his dignity throughout . . . He’s just America’s doctor.”

As the #FireFauci hashtag trended on Twitter, Sen. Marco Rubio (R-Fla.) pushed back.

“#FireFauci? For what?” Rubio asked in a tweet that blamed China in part for what he described as a slow initial response to the virus. “Can’t change past but can avoid repeating it.”

“For what he does, he’s held in the highest regard,” said Josh Holmes, an adviser to Senate Majority Leader Mitch McConnell (R-Ky.) who talks to a range of Senate Republicans.

Fauci, while generally respected in the White House, has had a number of moments that attracted criticism — at least internally, according to White House officials who spoke on the condition of anonymity to discuss internal deliberations.

In a Situation Room meeting in the second week of February, Fauci said there was not yet evidence of community spread in the United States. But Joe Grogan, director of the White House Domestic Policy Council, asked whether the case count was so low because officials weren’t testing enough people and the criteria was still limited to people with recent travel to China and those who had come into contact with a confirmed case, officials said.

Grogan called for broader testing.

“What would be the epidemiological reason for that?” Fauci asked Grogan. Grogan soon left the room, startling others, the officials said.

Fauci also told the president months ago that the virus was more likely to go away when it became warmer outside, officials said. Trump’s later comments echoing that view have been featured in attack ads criticizing the president’s coronavirus response.

Fauci has been deeply critical of the models charting the pandemic privately in task force meetings but has appeared to buttress the reports publicly, frustrating some administration officials.

Trump has griped about Fauci’s media appearances, but he is unlikely to be fired, officials said. And Trump has disliked Fauci’s skepticism of hydroxychloroquine, telling other advisers that he wished Fauci was more positive about a drug the president has touted as a potential “game changer” for treating covid-19.

Some outside allies, like the president’s personal attorney, Rudolph W. Giuliani, have been critical of Fauci about the drug, even though its effectiveness against coronavirus remains unproven.

“I really think it’s a case of political prejudice overwhelming science,” Giuliani said in a recent interview.

One Trump adviser with knowledge of his Sunday activities said the president was furious about a story in the New York Times that outlined missteps and delays that hampered his administration’s response to the coronavirus. His retweet on Sunday was an attempt to attack the story rather than Fauci, the adviser said. Fauci appeared to confirm part of the story in his CNN interview Sunday.

Trump fumed all day Sunday and part of Monday about allegations that he did not act quickly enough on the coronavirus, a senior White House official said. He asked advisers to prepare a detailed rebuttal, and the president played a campaign-style video defending his response during Monday’s briefing.

In his statement, Gidley said the president was only attempting to attack the media.

But Fauci’s willingness to contradict Trump has opened him up to growing criticism from some of the president’s allies.

Speaking on James T. Harris’s radio show “The Conservative Circus,” Rep. Andy Biggs (R-Ariz.) said it was time for Fauci to “move along,” blaming the doctor for the country’s economic struggles.

“This has basically emasculated the United States economy,” Biggs said. “And part of it is because Dr. Fauci took what I would call a generic meat-cleaver approach to this thing where everybody is going to be basically isolated.”

Biggs’s remarks underscore a key ongoing debate between Trump and his public health experts over how long to continue the social distancing guidelines that have shut down much of the economy.

While one senior administration official said he hadn’t heard about Trump’s retweet because “tweets come and go around this place,” others expressed concerns that Trump may have soured on Fauci and would be unlikely to listen to his warnings about the risk of reopening the country too early.

Among both Democratic and Republican lawmakers, Fauci has been the most trusted administration expert on the unfolding pandemic, with senators valuing his expertise and candor, congressional officials said.

During an early March lunch at the Capitol, Sen. Lamar Alexander (R-Tenn.), the chairman of the Committee on Health, Education, Labor and Pensions, urged Vice President Pence to make Fauci the primary spokesperson on the coronavirus to ensure that a unified message was coming from the administration, according to two people familiar with the senator’s remarks.

“He is the single most important expert in the United States government at this time,” Sen. Brian Schatz (D-Hawaii) said Monday. “He relies on science, and science only, and speaks the truth to the public. That’s why he may in fact be in danger.”

Sen. Chris Murphy (D-Conn.) described Fauci as a “rare breed who stuck around and gained influence simply because he knew his stuff.” But he said he was worried about his future in the administration.

“You don’t need to be fired in this administration to become invisible,” he said.

But some of the president’s supporters have soured on Fauci. Doug Deason, a Trump bundler and ally, said that Deborah Birx, the White House coronavirus response coordinator, was doing a “great job.” Fauci, he said by contrast, was “doing a pretty good job.”

Still, Deason reflected some of the concerns expressed by Trump allies who have shown little patience for government officials who do not appear sufficiently loyal to the president. At times, Deason said, it seems as if Fauci is “in cahoots with the deep state.”

“He’s more political, and I just wish he’d leave the politics out of it,” he said.

In a recent Situation Room meeting, Trump alluded to the media commentary on his relationship with Fauci, according to people in the room.

“Everyone says we don’t get along, but I love you,” Trump said jokingly.

John Wagner, Lenny Bernstein and Yasmeen Abutaleb contributed to this report.