WASHINGTON — As President Donald Trump jetted back to Washington on Monday after a weekend of golfing and fundraising in Florida, an intervention was awaiting him at the White House.

Administration officials, increasingly concerned about the messaging on and response to the coronavirus, had spent the weekend scrambling to craft a strategy to shift the president's response, which had been focused on downplaying the threat and accusing the media of creating undue concern, according to people involved in the effort.

So, as Trump stepped off Marine One and walked straight to the West Wing just after 3 p.m. Monday, his top economic and health officials were waiting to make their case for why a more serious fiscal and public health response was urgently needed. Those at the meeting included economic adviser Larry Kudlow, Vice President Mike Pence and Secretary of the Treasury Steven Mnuchin.

Shortly after the meeting wrapped, Trump appeared ready to start taking a stronger approach — at least compared to the one he had offered that morning, when he likened the coronavirus to the seasonal flu, tweeting of the flu that "nothing is shut down, life & the economy go on."

He made an impromptu visit to the White House briefing room that evening, just the fifth time he has appeared behind the podium, telling reporters he was considering a payroll tax cut and promising "dramatic" and "major" economic steps.

Full coverage of the coronavirus outbreak

Those remarks Monday night marked the beginning of a notable, if uneven, shift in the president's tone as the scope of the crisis he was dealing with began to sink in, culminating just over 48 hours later in an Oval Office address warning the nation of a "horrible infection."

Beyond the input of concerned advisers, a constellation of events over the past week — from tumbling stocks to the rising death toll and the World Health Organization's official declaration of a pandemic — played a role in prompting Trump to shift to a more somber tone, an administration official said.

It resulted in presidential statements in stark contrast to remarks just two weeks earlier, when Trump had predicted that the United States would soon have zero cases of the illness, despite warnings from his own health officials that the virus' spread across the nation wasn't a matter of if but when.

As Trump left Washington last Friday for his Mar-a-Lago resort, he stopped at the Centers for Disease Control and Prevention, where he touted the administration's response and mused about not wanting to let passengers on a stranded cruise ship back in the U.S. because it would reflect poorly on the statistics.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I like the numbers being where they are. I don't need to have the numbers double because of one ship," Trump told reporters.

Over the weekend, he golfed with players from the Washington Nationals and raised $10 million in a series of fundraisers. During a dinner with the president of Brazil, Trump told reporters Saturday night that he wouldn't be canceling his crowded political rallies.

On Sunday, while Trump was at his Palm Beach golf course, Pence was about an hour away meeting with cruise industry executives about the coronavirus threat.

Back in Washington, aides had grown frustrated with Trump's consistent bids to downplay the severity of the outbreak. A person close to the White House said the president believed it helped him politically to keep projecting a positive picture, rather than leaving the messaging to public health officials.

But Trump's week started with a jolt. Oil markets crashed overnight and stocks plunged so much at the start of trading Monday that it tripped a New York Stock Exchange circuit breaker aimed at preventing a broader panic by investors. Trump tried to put a positive spin on the events that morning, tweeting that tumbling oil prices would mean cheaper gas for consumers.

The next day, he traveled to Capitol Hill, where Republican senators warned him about the negative impact the crash in oil prices would have on the U.S. oil industry and the risk to the nation's economy as a whole.

The same day, even his own campaign advisers — who had previously downplayed the need to change his schedule — pressed Trump not to announce a planned rally in Florida because of fears of the virus' spread. The president initially pushed back on the request.

But it came amid news of a cascade in new infections, with states taking swift action, such as New York Gov. Andrew Cuomo's move to send in the National Guard to try to contain an outbreak in a New York City suburb.

The virus also began affecting Trump's inner circle. Rep. Matt Gaetz, R-Fla., who flew back from Florida to Washington with Trump on Monday, learned midflight that he had interacted with an infected patient and would need to self-quarantine immediately.

By Wednesday morning, when WHO declared that the coronavirus was officially a pandemic, White House aides began discussing the possibility of an Oval Office address. Trump tweeted out that he would be speaking to the nation later that night.

Download the NBC News app for full coverage of the coronavirus outbreak

In the runup to his prime-time speech, the White House rushed to put restrictions on travel from Europe in place — without informing European leaders, who were furious over being blindsided by the move. Trump said the affected countries hadn't been notified because "we had to make a decision, and I didn't want to take time and — you know, it takes a long time to make the individual calls."

The hastily assembled speech was full of statements the administration had to correct and clarify soon after. Trump erroneously said trade would be affected by the travel restrictions. He also said all travel from Europe would be banned, even though the new restrictions apply only to foreign nationals who have traveled through some European countries. His claim that insurance copayments for coronavirus treatment would be waived was contradicted by health insurers themselves, who said the waiver would apply only to testing.

The stumbles, people close to the White House acknowledged, detracted from the intended effect of the address: portraying Trump as a commander in chief steering the country through a crisis.

On Thursday, Trump's Twitter account took on a much more serious tone, retweeting warnings from public health officials about how people could protect themselves, as both the White House and his campaign weighed allowing staffers to work from home. But as with many previous Trump tone shifts, his attempt at a more traditional presidential approach was inconsistent and impermanent.

Meanwhile, one of the nation's top health officials was telling lawmakers on Capitol Hill that the federal response was falling short on a key front, with the nation failing to meet the necessary capacity for coronavirus testing. That didn't keep Trump from heaping praise on his own response Thursday.

"Because of what I did and what the administration did with China, we have 32 deaths at this point. Other countries that are smaller countries have many, many deaths," Trump told reporters in the Oval Office during a meeting with the Irish prime minister.

"Thirty-two is a lot. Thirty-two is too many," he said. "But when you look at the kind of numbers that you're seeing coming out of other countries, it's pretty amazing when you think of it."