For two decades, American foreign policy has been shaped by the 9/11 attacks. The catastrophic wars in Iraq and Afghanistan, our failure to see the full threat posed by Russian President Vladimir Putin until the 2016 election and our lack of focus on China’s rise — the most important geopolitical development of the early 21st century — are all partly a function of our obsession with counterterrorism and Middle East conflict in the aftermath of 9/11.

The coronavirus pandemic might finally change that, because the sheer magnitude of the crisis can — should — force an overdue rethinking of our foreign policy priorities that’s long overdue.

The Sept. 11, 2001, terrorist attacks became the filter for the foreign policy community, the media and American public to view events around the world, many times putting disproportionate emphasis on Middle East conflict, shaping how policymakers and the military implement and prioritize U.S. objectives.

The result has been an environment in which it is nearly impossible for American leaders to end our addiction to the Middle East. President Barack Obama believed that we had allowed the threat of terrorism to be inflated and that the future of the Americans’ national security lay in building stronger relations in Asia. His decision to draw down from the Iraq War certainly played a role in the rise of the Islamic State, which then merited a further military intervention. But it was pressure from domestic opinion, the media and some of his advisers that transformed that campaign into the dominant foreign policy issue of the last two years of his administration. When he left office, the United States was still entangled militarily, to varying degrees, in Iraq, Syria, Afghanistan, Somalia, Yemen and Libya.

President Trump’s administration introduced and touted a National Defense Strategy meant to shift U.S. focus toward great-power competition with China. But more than three years into Trump’s presidency, we have barely avoided full-scale war with Iran, and we’re maintaining two U.S. carrier strike groups in the Middle East for the first time in almost a decade.

All this adds up to a continuing commitment of resources and attention to a region that no longer represents the area of greatest concern to national security. Terrorism, as we’ve come to think of it, is still a real threat, but it’s one of many competing national security issues and doesn’t necessarily present the gravest threat.

The covid-19 crisis may finally be the moment that breaks America free from this counterterrorism fixation and forces us to view the world differently, precisely because, like 9/11, its impact will penetrate our collective psyche. Nearly all Americans will have, or are already having, their lives fundamentally disrupted: spending weeks at home educating kids; worrying about elderly parents and other vulnerable loved ones; (hopefully) avoiding bars and restaurants; or, god forbid, knowing someone who falls ill. And there’s collective uncertainty about the slow response of government at the highest levels. Because this crisis will probably affect all of us, it has the potential to fundamentally reorient our approach to the world.

Already, the focus is changing. Last week, two Americans and one British citizen were killed in Iraq by Iran-supported militias. The United States responded with a series of strikes that barely broke through the news cycle. It was a sharp contrast to previous escalations over the past year, with Iranian attacks on oil shipping and a U.S. drone last summer, Saudi Arabian oil facilities in September and, most notably, escalation in Iraq during December and January that culminated in the killing of Iranian Gen. Qasem Soleimani and Iranian missile strikes on American bases that dominated news coverage. Sequences like this, which used to drive debate in Washington and with the public, probably won’t have the same resonance now that we’re confronting covid-19, and over time that will mean less political support for and policy focus on conflicts in the Middle East.

But even after this crisis passes, its all-encompassing nature will result in meaningful changes to American institutions and society. There will probably be a coronavirus commission similar in scope to the 9/11 commission that could lead to a massive reorganization of our government to ensure we are ready to respond to future pandemics.

Just as Arabic language and Middle East studies programs multiplied after 9/11, expect a surge of students to public health programs, and a surge of funding for epidemiological research. Public health experts like the Anthony S. Fauci of the National Institutes of Health will go from being unknown bureaucrats to recognizable figures like counterterrorism czar Richard Clarke did after 9/11. And like terrorism did after 9/11, public health will go from being a secondary issue to dominating the agenda in international forums such as NATO, the United Nations or the Group of 7.

The covid-19 crisis is, obviously, a dangerous moment, but once we manage collectively to slow its spread, it is also a potential opportunity. The years immediately following huge shocks, such as World War II or 9/11, create political space to reorient our foreign policy and restructure our government that is not possible in normal times. After World War II, we created several international institutions, most notably the United Nations, altered our entire national security bureaucracy with the 1947 National Security Act and developed the doctrine of containment of the Soviet Union, which drove U.S. foreign policy for the next half-century.

After 9/11, we prosecuted a series of wars across the Middle East, created a new bureaucracy with the Department of Homeland Security and enacted laws, including the Patriot Act, that curtailed privacy and civil rights in the name of security. But this window for making big, fundamental changes won’t last long, and when it ends, and America returns to politics as usual, the decisions we make during the aftermath of the covid-19 crisis will stay with us for years and define our foreign policy. For example, we should expect an entire top-to-bottom rethink of our global supply chains for pharmaceuticals and medical supplies that are likely to define this economic sector for years to come.

We have gotten these critical moments wrong in the past with tragic consequences. After World War I, the United States turned inward toward isolationism, setting the stage for World War II. After 9/11, the catastrophic decision to invade Iraq wasted billions of dollars, cost thousands of lives and failed to make us safer.

But there have also been moments when these inflection points yielded hugely consequential and positive outcomes. After World War II, we built institutions such as NATO and the U.N., invested in the Marshall Plan, ultimately setting the table for an American-led liberal international order and victory in the Cold War.

It’s too early to tell where we will go from here, but some lessons from previous inflection points could guide the way. We should not overreact: After 9/11, we mistakenly condoned torture and sent prisoners to Guantanamo Bay indefinitely. We should also consider how pandemic responses will look years from now: We entirely rethought our airport security systems, and now Transportation Security Administration is just a part of American life.

We also cannot be taken captive by ideologues, who use this fluid moment to push their own agenda as a number of President George W. Bush’s advisers did after 9/11, persuading him and the nation to overthrow Saddam Hussein.

Trump will try to run the same playbook and use this moment to imprint his “America First” vision on our foreign policy for a generation to come. He will turn inward as he already has, breaking alliances with our most important European partners, upending the world order at a time when we need it most, responding to a transnational challenge with an insular approach: He’s doing it by needlessly casting this pandemic as a standoff with the “Chinese Virus,” rhetorically folding a public health response into his ongoing trade war. Or with his reported efforts to pay off a German company to exclusively produce vaccines for the United States. The stakes are simply too high now for this kind of zero-sum approach.

The United States must put a greater emphasis on how it can lead a global response to transnational challenges such as global pandemics and global warming, which threaten us all. It will have to consider the massive role China has played both in starting the crisis but also in responding to it and what that means for the future of great power competition — and cooperation. And it should examine the uncoordinated response between its own actions and those of its closest democratic allies in Europe and consider whether this can be an impetus for updating our alliances to deal with the new threats of the 21st century.

The United States will still have to worry about terrorism and the Middle East conflict, but perhaps finally after 20 years of threat inflation America’s role in the region can be put in the proper perspective.

For years now, America has made the mistake of fighting the last war. Today’s crisis will inevitably force a reassessment. But we should not overreact to the coronavirus crisis nor allow it to be used as an opportunity for ideologues to pursue a narrow agenda. Instead, we must assimilate what we learn from this experience and use this moment to reimagine our foreign policy, institutions and strategic alliances for the 21st century.