In 2014, President Barack Obama founded the Global Health Security Agenda to rally developed countries to help many of the least-developed countries build their capacities to detect, contain and combat diseases before they spread widely. Under President Trump, much of the funding for the C.D.C., United States Agency for International Development and other agencies for that and related initiatives was cut.

As Mr. Obama’s national security adviser, I established the office of Global Health Security and Biodefense at the National Security Council to monitor, prepare for and prevent global health crises. In 2018, my successor dismantled the office, pushed its leader, Rear Adm. R. Timothy Ziemer, out and downgraded the position of Homeland Security adviser. During the transition in January 2017, the Obama team provided briefing papers and conducted a side-by-side exercise with leaders of the incoming Trump administration focused on pandemic threats. Like much of the assistance we offered, it was discarded by the incoming team.

Second, consistent with his nationalistic, xenophobic orientation, Mr. Trump has portrayed the virus that causes Covid-19 as a “foreign virus.” In reality, viruses know no nationality and respect no borders. Demonizing foreigners, denigrating people of different religions and hues, building walls and restricting immigration are not effective ways to combat a pandemic. Nor do they solve our economic challenges or assuage those uncomfortable with our growing racial diversity.

No American lives have been saved by blaming China for the origin or spread of the virus. A containment strategy predicated on keeping certain foreigners out, if swiftly and properly executed, might have bought American authorities some time to prepare for the inevitable domestic outbreaks, but it could never prevent the emergence of such a highly transmissible disease. Unfortunately, whatever time might have been gained by halting most travel from China was not used to speed domestic preparedness.

In the same vein, Mr. Trump just announced a counterproductive and ineffectual suspension of travel from much of Europe. By refusing to consult or even warn our closest allies, the United States alienated partners whose cooperation we always need to confront global challenges, including the coronavirus. Moreover, the virus is already prevalent across the United States, and its magnitude will only grow. Mr. Trump’s arbitrary travel ban on Europeans, which inexplicably excludes Britain and Ireland, is rife with as many holes as Swiss cheese. Merely another feckless, if costly, way of blaming foreigners for our own problems, it does nothing to address the crisis already in our midst.