When asked why he had suddenly adopted a somber and realistic tone about the virus on Tuesday, the president denied that he had changed his mind at all.

“No, I’ve always viewed it as very serious,” Mr. Trump said. “There was no difference yesterday from days before. I feel the tone is similar, but some people said it wasn’t.”

Besides denying the seriousness of the coronavirus over the past two months, he had also displayed an acerbic tone toward people who took it more seriously.

During a campaign rally in South Carolina on Feb. 28, Mr. Trump accused Democrats and the news media of hysteria and unfairly criticizing his administration by engaging in what he said was a political “hoax.” Some of his critics have stretched his comment to suggest that he was calling the virus itself a hoax, but his supporters have argued that he was referring to the Democratic criticism, not the virus itself.

And until recently, he and several of his advisers had privately mocked his health and human services secretary, Alex M. Azar II, as alarmist.

Another theme has been the president’s offering inaccurate information.

At a campaign rally on Feb. 10, Mr. Trump suggested that the virus would be gone by April, a claim he has frequently repeated, even though his advisers had warned him that much about the virus was still not known.

As his administration came under intense criticism for a lack of urgency in issuing guidance to Americans or expediting tests for the virus, Mr. Trump continued misrepresenting what was available.