Open this photo in gallery U.S. President Donald Trump speaks about the coronavirus at the White House in Washington on April 7, 2020. Alex Brandon/The Associated Press

“Any way you cut it, this is going to be bad,” a senior medical adviser at the Department of Veterans Affairs, Dr. Carter Mecher, wrote on the night of Jan. 28, in an email to a group of public health experts scattered around the government and universities. “The projected size of the outbreak already seems hard to believe.”

A week after the first coronavirus case had been identified in the United States, and six long weeks before President Donald Trump finally took aggressive action to confront the danger the nation was facing — a pandemic that is now forecast to take tens of thousands of American lives — Mecher was urging the upper ranks of the nation’s public health bureaucracy to wake up and prepare for the possibility of far more drastic action.

“You guys made fun of me screaming to close the schools,” he wrote to the group, which called itself “Red Dawn,” an inside joke based on the 1984 movie about a band of Americans trying to save the country after a foreign invasion. “Now I’m screaming, close the colleges and universities.”

Story continues below advertisement

His was hardly a lone voice. Throughout January, as Trump repeatedly played down the seriousness of the virus and focused on other issues, an array of figures inside his government — from top White House advisers to experts deep in the Cabinet departments and intelligence agencies — identified the threat, sounded alarms and made clear the need for aggressive action.

The president, though, was slow to absorb the scale of the risk and to act accordingly, focusing instead on controlling the message, protecting gains in the economy and batting away warnings from senior officials. It was a problem, he said, that had come out of nowhere and could not have been foreseen.

Even after Trump took his first concrete action at the end of January — limiting travel from China — public health often had to compete with economic and political considerations in internal debates, slowing the path toward belated decisions to seek more money from Congress, obtain necessary supplies, address shortfalls in testing and ultimately move to keep much of the nation at home.

Unfolding as it did in the wake of his impeachment by the House and in the midst of his Senate trial, Trump’s response was colored by his suspicion of and disdain for what he viewed as the “Deep State” — the very people in his government whose expertise and long experience might have guided him more quickly toward steps that would slow the virus, and likely save lives.

Decision-making was also complicated by a long-running dispute inside the administration over how to deal with China. The virus at first took a back seat to a desire not to upset Beijing during trade talks, but later the impulse to score points against Beijing left the world’s two leading powers further divided as they confronted one of the first truly global threats of the 21st century.

The shortcomings of Trump’s performance have played out with remarkable transparency as part of his daily effort to dominate television screens and the national conversation.

But dozens of interviews with current and former officials and a review of emails and other records revealed many previously unreported details and a fuller picture of the roots and extent of his halting response as the deadly virus spread:

Story continues below advertisement

The National Security Council office responsible for tracking pandemics received intelligence reports in early January predicting the spread of the virus to the United States, and within weeks was raising options like keeping Americans home from work and shutting down cities the size of Chicago. Trump would avoid such steps until March.

Despite Trump’s denial weeks later, he was told at the time about a Jan. 29 memo produced by his trade adviser, Peter Navarro, laying out in striking detail the potential risks of a coronavirus pandemic: as many as half a million deaths and trillions of dollars in economic losses.

The health and human services secretary, Alex Azar, directly warned Trump of the possibility of a pandemic during a call on Jan. 30, the second warning he delivered to the president about the virus in two weeks. The president, who was on Air Force One while traveling for appearances in the Midwest, responded that Azar was being alarmist.

Azar publicly announced in February that the government was establishing a “surveillance” system in five American cities to measure the spread of the virus and enable experts to project the next hot spots. It was delayed for weeks. The slow start of that plan, on top of the well-documented failures to develop the nation’s testing capacity, left administration officials with almost no insight into how rapidly the virus was spreading. “We were flying the plane with no instruments,” one official said.

By the third week in February, the administration’s top public health experts concluded they should recommend to Trump a new approach that would include warning the American people of the risks and urging steps like social distancing and staying home from work. But the White House focused instead on messaging and crucial additional weeks went by before their views were reluctantly accepted by the president — time when the virus spread largely unimpeded.

When Trump finally agreed in mid-March to recommend social distancing across the country, effectively bringing much of the economy to a halt, he seemed shellshocked and deflated to some of his closest associates. One described him as “subdued” and “baffled” by how the crisis had played out. An economy that he had wagered his reelection on was suddenly in shambles.

He only regained his swagger, the associate said, from conducting his daily White House briefings, at which he often seeks to rewrite the history of the past several months. He declared at one point that he “felt it was a pandemic long before it was called a pandemic,” and insisted at another that he had to be a “cheerleader for the country,” as if that explained why he failed to prepare the public for what was coming.

Trump’s allies and some administration officials say the criticism has been unfair. The Chinese government misled other governments, they say. And they insist that the president was either not getting proper information, or the people around him weren’t conveying the urgency of the threat. In some cases, they argue, the specific officials he was hearing from had been discredited in his eyes, but once the right information got to him through other channels, he made the right calls.

“While the media and Democrats refused to seriously acknowledge this virus in January and February, President Trump took bold action to protect Americans and unleash the full power of the federal government to curb the spread of the virus, expand testing capacities and expedite vaccine development even when we had no true idea the level of transmission or asymptomatic spread,” said Judd Deere, a White House spokesman.

There were key turning points along the way, opportunities for Trump to get ahead of the virus rather than just chase it. There were internal debates that presented him with stark choices, and moments when he could have chosen to ask deeper questions and learn more. How he handled them may shape his reelection campaign. They will certainly shape his legacy.

The Containment Illusion

By the last week of February, it was clear to the administration’s public health team that schools and businesses in hot spots have to close. But in the turbulence of the Trump White House, it took three more weeks to persuade the president that failure to act quickly to control the spread of the virus would have dire consequences

Story continues below advertisement

When Dr. Robert Kadlec, the top disaster response official at the Health and Human Services Department, convened the White House coronavirus task force on Feb. 21, his agenda was urgent. There were deep cracks in the administration’s strategy for keeping the virus out of the United States. They were going to have to lock down the country to prevent it from spreading. The question was: When?

There had already been an alarming spike in new cases around the world and the virus was spreading across the Middle East. It was becoming apparent that the administration had botched the rollout of testing to track the virus at home, and a smaller-scale surveillance program intended to piggyback on a federal flu tracking system had also been stillborn.

In Washington, the president was not worried, predicting that by April, “when it gets a little warmer, it miraculously goes away.” His White House had yet to ask Congress for additional funding to prepare for the potential cost of wide-scale infection across the country, and health care providers were growing increasingly nervous about the availability of masks, ventilators and other equipment.

What Trump decided to do next could dramatically shape the course of the pandemic — and how many people would get sick and die.

With that in mind, the task force had gathered for a tabletop exercise — a real-time version of a full-scale war gaming of a flu pandemic the administration had run the previous year. That earlier exercise, also conducted by Kadlec and called “Crimson Contagion,” predicted 110 million infections, 7.7 million hospitalizations and 586,000 deaths following a hypothetical outbreak that started in China.

Story continues below advertisement

Facing the likelihood of a real pandemic, the group needed to decide when to abandon “containment” — the effort to keep the virus outside the U.S. and to isolate anyone who gets infected — and embrace “mitigation” to thwart the spread of the virus inside the country until a vaccine becomes available.

Among the questions on the agenda, which was reviewed by The New York Times, was when the department’s secretary, Azar, should recommend that Trump take textbook mitigation measures “such as school dismissals and cancellations of mass gatherings,” which had been identified as the next appropriate step in a Bush-era pandemic plan.

The exercise was sobering. The group — including Dr. Anthony Fauci of the National Institutes of Health; Dr. Robert Redfield of the Centers for Disease Control and Prevention, and Azar, who at that stage was leading the White House Task Force — concluded they would soon need to move toward aggressive social distancing, even at the risk of severe disruption to the nation’s economy and the daily lives of millions of Americans.

If Kadlec had any doubts, they were erased two days later, when he stumbled upon an email from a researcher at the Georgia Institute of Technology, who was among the group of academics, government physicians and infectious diseases doctors who had spent weeks tracking the outbreak in the Red Dawn email chain.

A 20-year-old Chinese woman had infected five relatives with the virus even though she never displayed any symptoms herself. The implication was grave — apparently healthy people could be unknowingly spreading the virus — and supported the need to move quickly to mitigation.

“Is this true?!” Kadlec wrote back to the researcher. “If so we have a huge whole on our screening and quarantine effort,” including a typo where he meant hole. Her response was blunt: “People are carrying the virus everywhere.”

Story continues below advertisement

The following day, Kadlec and the others decided to present Trump with a plan titled “Four Steps to Mitigation,” telling the president that they needed to begin preparing Americans for a step rarely taken in U.S. history.

But over the next several days, a presidential blowup and internal turf fights would sidetrack such a move. The focus would shift to messaging and confident predictions of success rather than publicly calling for a shift to mitigation.

These final days of February, perhaps more than any other moment during his tenure in the White House, illustrated Trump’s inability or unwillingness to absorb warnings coming at him. He instead reverted to his traditional political playbook in the midst of a public health calamity, squandering vital time as the coronavirus spread silently across the country.

Kadlec’s group wanted to meet with the president right away, but Trump was on a trip to India, so they agreed to make the case to him in person as soon as he returned two days later. If they could convince him of the need to shift strategy, they could immediately begin a national education campaign aimed at preparing the public for the new reality.

A memo dated Feb. 14, prepared in coordination with the National Security Council and titled “U.S. Government Response to the 2019 Novel Coronavirus,” documented what more drastic measures would look like, including: “significantly limiting public gatherings and cancellation of almost all sporting events, performances, and public and private meetings that cannot be convened by phone. Consider school closures. Widespread ‘stay at home’ directives from public and private organizations with nearly 100% telework for some.”

The memo did not advocate an immediate national shutdown but said the targeted use of “quarantine and isolation measures” could be used to slow the spread in places where “sustained human-to-human transmission” is evident.

Story continues below advertisement

Within 24 hours, before they got a chance to make their presentation to the president, the plan went awry.

Trump was walking up the steps of Air Force One to head home from India on Feb. 25 when Dr. Nancy Messonnier, the director of the National Center for Immunization and Respiratory Diseases, publicly issued the blunt warning they had all agreed was necessary.

But Messonnier had jumped the gun. They had not told the president yet, much less gotten his consent.

On the 18-hour plane ride home, Trump fumed as he watched the stock market crash after Messonnier’s comments. Furious, he called Azar when he landed at around 6 a.m. on Feb. 26, raging that Messonnier had scared people unnecessarily. Already on thin ice with the president over a variety of issues and having overseen the failure to quickly produce an effective and widely available test, Azar would soon find his authority reduced.

The meeting that evening with Trump to advocate social distancing was canceled, replaced by a news conference in which the president announced that the White House response would be put under the command of Vice President Mike Pence.

The push to convince Trump of the need for more assertive action stalled. With Pence and his staff in charge, the focus was clear: no more alarmist messages. Statements and media appearances by health officials like Fauci and Redfield would be coordinated through Pence’s office. It would be more than three weeks before Trump would announce serious social distancing efforts, a lost period during which the spread of the virus accelerated rapidly.

Over nearly three weeks from Feb. 26 to March 16, the number of confirmed coronavirus cases in the United States grew from 15 to 4,226. Since then, nearly half a million Americans have tested positive for the virus and authorities say hundreds of thousands more are likely infected.

The China Factor

The earliest warnings about coronavirus got caught in the crosscurrents of the administration’s internal disputes over China. It was the China hawks who pushed earliest for a travel ban. But their animosity toward China also undercut hopes for a more cooperative approach by the world’s two leading powers to a global crisis.

It was early January, and the call with a Hong Kong epidemiologist left Matthew Pottinger rattled.

Pottinger, the deputy national security adviser and a hawk on China, took a blunt warning away from the call with the doctor, a longtime friend: A ferocious, new outbreak that on the surface appeared similar to the SARS epidemic of 2003 had emerged in China. It had spread far more quickly than the government was admitting to, and it wouldn’t be long before it reached other parts of the world.

Pottinger had worked as a Wall Street Journal correspondent in Hong Kong during the SARS epidemic and was still scarred by his experience documenting the death spread by that highly contagious virus.

Now, 17 years later, his friend had a blunt message: You need to be ready. The virus, he warned, which originated in the city of Wuhan, was being transmitted by people who were showing no symptoms — an insight that U.S. health officials had not yet accepted. Pottinger declined through a spokesman to comment.

It was one of the earliest warnings to the White House, and it echoed the intelligence reports making their way to the National Security Council. While most of the early assessments from the CIA had little more information than was available publicly, some of the more specialized corners of the intelligence world were producing sophisticated and chilling warnings.

In a report to the director of national intelligence, the State Department’s epidemiologist wrote in early January that the virus was likely to spread across the globe, and warned that the coronavirus could develop into a pandemic. Working independently, a small outpost of the Defense Intelligence Agency, the National Center for Medical Intelligence, came to the same conclusion.

Within weeks after getting initial information about the virus early in the year, biodefense experts inside the National Security Council, looking at what was happening in Wuhan, started urging officials to think about what would be needed to quarantine a city the size of Chicago.

By mid-January there was growing evidence of the virus spreading outside China. Pottinger began convening daily meetings about the coronavirus. He alerted his boss, Robert C. O’Brien, the national security adviser.

The early alarms sounded by Pottinger and other China hawks were freighted with ideology — including a push to publicly blame China that critics in the administration say was a distraction as the coronavirus spread to Western Europe and eventually the United States.

And they ran into opposition from Trump’s economic advisers, who worried a tough approach toward China could scuttle a trade deal that was a pillar of Trump’s reelection campaign.

With his skeptical — some might even say conspiratorial — view of China’s ruling Communist Party, Pottinger initially suspected that the Chinese government was keeping a dark secret: that the virus may have originated in one of the laboratories in Wuhan studying deadly pathogens. In his view, it might have even been a deadly accident unleashed on an unsuspecting Chinese population.

During meetings and telephone calls, Pottinger asked intelligence agencies — including officers at the CIA working on Asia and on weapons of mass destruction — to search for evidence that might bolster his theory.

They didn’t have any evidence. Intelligence agencies did not detect any alarm inside the Chinese government that analysts presumed would accompany the accidental leak of a deadly virus from a government laboratory. But Pottinger continued to believe the coronavirus problem was far worse than the Chinese were acknowledging. Inside the West Wing, the director of the Domestic Policy Council, Joe Grogan, also tried to sound alarms that the threat from China was growing.

Pottinger, backed by O’Brien, became one of the driving forces of a campaign in the final weeks of January to convince Trump to impose limits on travel from China — the first substantive step taken to impede the spread of the virus and one that the president has repeatedly cited as evidence that he was on top of the problem.

In addition to the opposition from the economic team, Pottinger and his allies among the China hawks had to overcome initial skepticism from the administration’s public health experts.

Travel restrictions were usually counterproductive to managing biological outbreaks because they prevented doctors and other much-needed medical help from easily getting to the affected areas, the health officials said. And such bans often cause infected people to flee, spreading the disease further.

But on the morning of Jan. 30, Azar got a call from Fauci, Redfield and others saying they had changed their minds. The World Health Organization had declared a global public health emergency and American officials had discovered the first confirmed case of person-to-person transmission inside the United States.

The economic team, led by Treasury Secretary Steven Mnuchin, continued to argue that there were big risks in taking a provocative step toward China and moving to curb global travel. After a debate, Trump came down on the side of the hawks and the public health team. The limits on travel from China were publicly announced on Jan. 31.

Still, Trump and other senior officials were wary of further upsetting Beijing. Besides the concerns about the impact on the trade deal, they knew that an escalating confrontation was risky because the United States relies heavily on China for pharmaceuticals and the kinds of protective equipment most needed to combat the coronavirus.

But the hawks kept pushing in February to take a critical stance toward China amid the growing crisis. Pottinger and others — including aides to Secretary of State Mike Pompeo — pressed for government statements to use the term “Wuhan Virus.”

Pompeo tried to hammer the anti-China message at every turn, eventually even urging leaders of the Group of 7 industrialized countries to use “Wuhan virus” in a joint statement.

Others, including aides to Pence, resisted taking a hard public line, believing that angering Beijing might lead the Chinese government to withhold medical supplies, pharmaceuticals and any scientific research that might ultimately lead to a vaccine.

Trump took a conciliatory approach through the middle of March, praising the job China’s President Xi Jinping was doing.

That changed abruptly, when aides informed Trump that a Chinese Foreign Ministry spokesman had publicly spun a new conspiracy about the origins of COVID-19: that it was brought to China by U.S. Army personnel who visited the country last October.

Trump was furious, and he took to his favorite platform to broadcast a new message. On March 16, he wrote on Twitter that “the United States will be powerfully supporting those industries, like Airlines and others, that are particularly affected by the Chinese Virus.”

Trump’s decision to escalate the war of words undercut any remaining possibility of broad cooperation between the governments to address a global threat. It remains to be seen whether that mutual suspicion will spill over into efforts to develop treatments or vaccines, both areas where the two nations are now competing.

One immediate result was a free-for-all across the United States, with state and local governments and hospitals bidding on the open market for scarce but essential Chinese-made products. When the state of Massachusetts managed to procure 1.2 million masks, it fell to the owner of the New England Patriots, Robert Kraft, a Trump ally, to cut through extensive red tape on both sides of the Pacific to send his own plane to pick them up.

The Consequences of Chaos

The chaotic culture of the Trump White House contributed to the crisis. A lack of planning and a failure to execute, combined with the president’s focus on the news cycle and his preference for following his gut rather than the data cost time, and perhaps lives.

Inside the West Wing, Navarro, Trump’s trade adviser, was widely seen as quick-tempered, self-important and prone to butting in. He is among the most outspoken of China hawks and in late January was clashing with the administration’s health experts over limiting travel from China.

So it elicited eye rolls when, after initially being prevented from joining the coronavirus task force, he circulated a memo on Jan. 29 urging Trump to impose the travel limits, arguing that failing to confront the outbreak aggressively could be catastrophic, leading to hundreds of thousands of deaths and trillions of dollars in economic losses.

The uninvited message could not have conflicted more with the president’s approach at the time of playing down the severity of the threat. And when aides raised it with Trump, he responded that he was unhappy that Navarro had put his warning in writing.

From the time the virus was first identified as a concern, the administration’s response was plagued by the rivalries and factionalism that routinely swirl around Trump and, along with the president’s impulsiveness, undercut decision making and policy development.

Faced with the relentless march of a deadly pathogen, the disagreements and a lack of long-term planning had significant consequences. They slowed the president’s response and resulted in problems with execution and planning, including delays in seeking money from Capitol Hill and a failure to begin broad surveillance testing.

The efforts to shape Trump’s view of the virus began early in January, when his focus was elsewhere: the fallout from his decision to kill Gen. Qassem Soleimani, Iran’s security mastermind; his push for an initial trade deal with China; and his Senate impeachment trial, which was about to begin.

Even after Azar first briefed him about the potential seriousness of the virus during a phone call on Jan. 18 while the president was at his Mar-a-Lago resort in Florida, Trump projected confidence that it would be a passing problem.

“We have it totally under control,” he told an interviewer a few days later while attending the World Economic Forum in Switzerland. “It’s going to be just fine.”

Back in Washington, voices outside of the White House peppered Trump with competing assessments about what he should do and how quickly he should act.

The efforts to sort out policy behind closed doors were contentious and sometimes only loosely organized.

That was the case when the National Security Council convened a meeting on short notice on the afternoon of Jan. 27. The Situation Room was standing room only, packed with top White House advisers, low-level staffers, Trump’s social media guru and several Cabinet secretaries. There was no checklist about the preparations for a possible pandemic, which would require intensive testing, rapid acquisition of protective gear, and perhaps serious limitations on Americans’ movements.

Instead, after a 20-minute description by Azar of his department’s capabilities, the meeting was jolted when Stephen E. Biegun, the newly installed deputy secretary of state, announced plans to issue a “level four” travel warning, strongly discouraging Americans from traveling to China. The room erupted into bickering.

A few days later, on the evening of Jan. 30, Mick Mulvaney, the acting White House chief of staff at the time, and Azar called Air Force One as the president was making the final decision to go ahead with the restrictions on China travel. Azar was blunt, warning that the virus could develop into a pandemic and arguing that China should be criticized for failing to be transparent.

Trump rejected the idea of criticizing China, saying the country had enough to deal with. And if the president’s decision on the travel restrictions suggested that he fully grasped the seriousness of the situation, his response to Azar indicated otherwise.

Stop panicking, Trump told him.

That sentiment was present throughout February, as the president’s top aides reached for a consistent message but took few concrete steps to prepare for the possibility of a major public health crisis.

During a briefing on Capitol Hill on Feb. 5, senators urged administration officials to take the threat more seriously. Several asked if the administration needed additional money to help local and state health departments prepare.

Derek Kan, a senior official from the Office of Management and Budget, replied that the administration had all the money it needed, at least at that point, to stop the virus, two senators who attended the briefing said.

“Just left the Administration briefing on Coronavirus,” Sen. Chris Murphy, D-Conn., wrote in a tweet shortly after. “Bottom line: they aren’t taking this seriously enough.”

The administration also struggled to carry out plans it did agree on. In mid-February, with the effort to roll out widespread testing stalled, Azar announced a plan to repurpose a flu-surveillance system in five major cities to help track the virus. The effort all but collapsed even before it got started as Azar struggled to win approval for $100 million in funding and the CDC failed to make reliable tests available.

The number of infections in the United States started to surge through February and early March, but the Trump administration did not move to place large-scale orders for masks and other protective equipment, or critical hospital equipment, such as ventilators. The Pentagon sat on standby, awaiting any orders to help provide temporary hospitals or other assistance.

As February gave way to March, the president continued to be surrounded by divided factions even as it became clearer that avoiding more aggressive steps was not tenable.

Trump had agreed to give an Oval Office address on the evening of March 11 announcing restrictions on travel from Europe, where the virus was ravaging Italy. But responding to the views of his business friends and others, he continued to resist calls for social distancing, school closures and other steps that would imperil the economy.

But the virus was already multiplying across the country — and hospitals were at risk of buckling under the looming wave of severely ill people, lacking masks and other protective equipment, ventilators and sufficient intensive care beds. The question loomed over the president and his aides after weeks of stalling and inaction: What were they going to do?

The approach that Azar and others had planned to bring to him weeks earlier moved to the top of the agenda. Even then, and even by Trump White House standards, the debate over whether to shut down much of the country to slow the spread was especially fierce.

Always attuned to anything that could trigger a stock market decline or an economic slowdown that could hamper his reelection effort, Trump also reached out to prominent investors like Stephen Schwarzman, chief executive of Blackstone Group, a private equity firm.

“Everybody questioned it for a while, not everybody, but a good portion questioned it,” Trump said earlier this month. “They said, let’s keep it open. Let’s ride it.”

In a tense Oval Office meeting, when Mnuchin again stressed that the economy would be ravaged, O’Brien, the national security adviser, who had been worried about the virus for weeks, sounded exasperated as he told Mnuchin that the economy would be destroyed regardless if officials did nothing.

Soon after the Oval Office address, Dr. Scott Gottlieb, the former commissioner of the Food and Drug Administration and a trusted sounding board inside the White House, visited Trump, partly at the urging of Jared Kushner, the president’s son-in-law. Gottlieb’s role was to impress upon the president how serious the crisis could become. Pence, by then in charge of the task force, also played a role at that point in getting through to the president about the seriousness of the moment in a way that Azar had not.

But in the end, aides said, it was Dr. Deborah Birx, the veteran AIDS researcher who had joined the task force, who helped to persuade Trump. Soft-spoken and fond of the kind of charts and graphs Trump prefers, Birx did not have the rough edges that could irritate the president. He often told people he thought she was elegant.

On Monday, March 16, Trump announced new social distancing guidelines, saying they would be in place for two weeks. The subsequent economic disruptions were so severe that the president repeatedly suggested that he wanted to lift even those temporary restrictions. He frequently asked aides why his administration was still being blamed in news coverage for the widespread failures involving testing, insisting the responsibility had shifted to the states.

During the last week in March, Kellyanne Conway, a senior White House adviser involved in task force meetings, gave voice to concerns other aides had. She warned Trump that his wished-for date of Easter to reopen the country likely couldn’t be accomplished. Among other things, she told him, he would end up being blamed by critics for every subsequent death caused by the virus.

Within days, he watched images on television of a calamitous situation at Elmhurst Hospital Center, miles from his childhood home in Queens, New York, where 13 people had died from the coronavirus in 24 hours.

He left the restrictions in place.

Our Morning Update and Evening Update newsletters are written by Globe editors, giving you a concise summary of the day’s most important headlines. Sign up today.