The lights are going out all over Europe, the U.S., and increasingly the rest of the world. Borders are closing, cities are shutting down, and governments are imposing export bans. It looks like one of the first victims of the new coronavirus is globalization.

The World Bank has estimated that 80 to 90 percent of the economic damage from epidemics usually comes from aversion behavior, not from disease, deaths, and the associated loss of production. This time, due to the massive scale of the shutdowns, that cost is going to be much bigger.

Perhaps not in Sweden, though. It's hard to predict even the next few hours or days, but it is interesting that Sweden—the one European country that did not want to shut its borders, did not close schools, and has not banned gatherings of fewer than 500 people—so far seems to be containing the spread better than other countries have.

With beautiful exaggeration, Bloomberg News reported that "Swedes Try Laissez-Faire Model in Controversial Virus Response." Sweden did not do this out of libertarian zeal, but because of a tradition of listening to experts and health authorities, who thought it better to track individual cases within the country than to shut everything down. When everybody is awaiting the latest epidemiological data to make decisions, there is less room for political grandstanding and strongman rhetoric.

There is also a case to be made that the culture of personal responsibility and interpersonal trust makes it easier for the Swedish government to leave the ultimate decisions to the people. When the public health agency recommends working from home and avoiding unnecessary gatherings, most Swedes abide by it, even without putting police on the streets and imposing stiff penalties. That leaves necessary room for local knowledge and personal needs. Individuals, organizations, and businesses can go ahead anyway, if their particular situation makes it especially important that they remain open or move around freely.

And by the way, it might help that Sweden is a country of introverts, famous for distant relations between generations. Swedes did social distancing before it was cool.

There are reasons to fear that this near-consensus toward cordoning off whole nations will strengthen an already ongoing global reactionary impulse against the movement of people and goods across borders. If we can't find our way back to an open world after this, our reaction to COVID-19 will hurt us even more than the virus. After decades of unprecedented progress at combating poverty, hunger, and disease, these trends would be reversed, and we would be even less well prepared for the next nasty surprise nature throws at us.

Despite the popular perception, our best hope against pandemic is continued trade and cooperation across borders. Travel bans are mostly "political placebo" as U.K. health researcher Clare Wenham puts it, and the World Health Organization is advising against it, for the simple reason that COVID-19 is already everywhere, but vital supplies and medical equipment are not.

In fact, one reason why Italy has suffered terribly seems to be that closed borders gave them a false sense of security and made them underestimate the spread already going on within the country.

It is easy to see the political logic behind bans on the export of essential equipment, implemented by countries like Germany and France at an early stage. You have to serve your own population first, right? But it's the same logic as toilet paper hoarding, and it has the same result. It forces others to do the same, which means that it is not on the market when you really have to go.

During the global food price crisis of 2010–11, many governments banned food exports to secure local supplies. But afterward, we found out that those bans were part of the problem. In fact, they accounted for 40 percent of the increase in the world price of wheat and almost a quarter of the increase in the price of corn.

So even though the world often moves in a nationalist direction during crises, it is exactly the time when we have the most urgent need for international agreements to forego beggar-thy-neighbor policies.

Wealth, communications technology, and open science have made our response to new diseases faster than ever. In a poorer and more closed world, without mass transportation, microorganisms traveled slower but they traveled freely, recurring for hundreds of years, until they had picked almost all of us off, one by one. Today our response is also global, and therefore for the first time, mankind has a fighting chance.

Hospitals, researchers, health authorities, and drug companies everywhere can now supply each other with instant information. They can coordinate efforts to analyze and combat the problem. By organizing clinical trials of therapeutics in many countries simultaneously, they can reach a critical mass of patients they would never have found at home.

The pace of the response has been extraordinary. After having tried to conceal the outbreak for weeks, China announced that it had found a new coronavirus on January 2. Using technologies developed on the other side of the globe, Chinese scientists could read the complete genome of the virus and publish it on a new global hub for medical research in just a week. This information enabled researchers in Berlin to develop a test to detect infections in just six days. This is what we now use to track infected people around the world—except in the U.S., where the Centers for Disease Control and Prevention insisted on keeping it out and developing a domestic, faulty test, which set back American efforts several weeks.

When someone reveals the mechanism of the virus, researchers and algorithms everywhere can get to work on ways of attacking its weak spots. On March 25, not even three months after China admitted a new virus was on the loose, America's National Library of Medicine lists 143 potential drugs and vaccines against the virus, already recruiting (or preparing to recruit) patients to participate in clinical trials.

Those companies are, just like our health care systems, disproportionally reliant on immigrant workers. According to the immigration advocacy nonprofit Partnership for a New American Economy, eight out of 10 medical patents from leading U.S. universities are invented by someone born outside of the country. In other words, immigration bans kill Americans.

That is not all. Globalization might even prevent many pandemics from happening. A 2019 study by researchers at the universities of Oxford and Tel Aviv showed that frequent travel between populations makes us catch a lot of bugs, but also increases immunity against new strains. So apocalyptic outbreaks become less likely. This is the reason why previously isolated populations are most at risk—from Native Americans after 1492 to the swine flu in 2009, when 24 of the 30 worst affected countries were island nations.

Human mobility is like a "natural vaccination" says Oxford's Robin Thompson. The researchers speculate that this might help explain the absence of a global pandemic as severe as the Spanish flu in the last 100 years.

That doesn't help at all when a virus that previously only affected animals mutates and jumps to humans, like the new coronavirus. Then we have no resistance and it can spread quickly.

But if the researchers are correct, the jet engine has saved millions of lives from pandemics only in the last few decades. And as even Sweden's governing Social Democrats emphasize right now, the greatest threat to our economy, our jobs, and our health is that the planes stop flying and the trucks get stuck at the border.

That is also worth taking into account before we turn off the last lights.