On June 28, Donald Trump delivered a speech of uncharacteristic narrative coherence to an audience in Monessen, Pennsylvania, a small city that used to specialize in steel manufacturing. He attributed the area’s economic troubles to a variety of causes originating outside the state of Pennsylvania, including NAFTA, trade with China, and illegal Mexican immigration.

Like a Medieval pathologist, Trump identified a real affliction and prescribed a remedy that could kill the patient. Trump’s core demographic, white men without a college degree, have been battered by several decades of globalization and technological change. But his ideas are the equivalent of bloodletting, according to many economists. Millions of people would lose their jobs under Trump’s economic plans, and trade wars would raise prices and punish companies that rely on exports. That is hardly a prescription for a middle-class revival.

The U.S. could use some protection—just not the variety that Trump offers.

Most people think of protectionism as externally focused—for example, protecting companies from foreign competition. But what the U.S. middle class really needs is more domestic protectionism from homeland adversaries, such as geographic inequality, income inequality, corporate monopolies, and rising health-care costs.

Imagine a policy matrix: open vs. protective on one axis, home vs. abroad on the other. Three leading politicians represent the some combination of those ideas:

  • Paul Ryan—open abroad, open at home—is a free trade advocate who believes less government involvement is better for the poor.

  • Bernie Sanders—protective abroad, protective at home—is skeptical of free trade and wants to raise taxes across the board to pay for a democratic socialist safety net.

  • Donald Trump is protective abroad and a Pollockian mess at home. His plans detail a historic tax cut, but he tells some people he wants a tax increase; he says he wants people to keep their health care, but he also wants to repeal Obamacare.

There is a fourth way. Think of it as “smart protectionism.” That is, to be open abroad and protective at home.

To think through smart protectionism, consider the controversial history of NAFTA. Sanders and Trump have blasted the trade agreement for, as Jeff Faux, the founding president of the Economic Policy Institute, put it, opening “the door through which American workers were shoved, unprepared, into a brutal global competition for jobs that has cut their living standards and is destroying their future."

NAFTA may have contributed to the disappearance of hundreds of thousands of American jobs. But it was also a boon to the Mexican economy, raising employment in that country by 1.5 million workers, according to the economist Brad DeLong. Nationalists often elide the fact that Mexicans are people; their personhood is not conjured out of thin air when they receive a temporary U.S. visa or green card. That free trade helps workers in other countries is a feature, not a bug, of the policy.

In defending NAFTA on behalf of American workers, DeLong shifts the focus away from trade policy entirely, writing:

I am of the faction that holds that if we are unhappy with the level of employment and of wages in the U.S., we should change our monetary, spending, taxing, banking, regulatory, and exchange rate policies to change them.

In other words, it is possible to pursue a free-trade agreement that helps Mexico and lowers prices on American products while simultaneously pursuing policies, such as income transfers, to workers displaced by those very trade agreements. This is not protectionism. But it is protection.

There are other ways to practice smart protectionism at home. In a column for the Washington Post, Fareed Zakaria has argued for what he calls “open and armed” economics—trade markets open to the world and labor markets armed to protect the vulnerable. There are some obvious solutions that even have tepid Republican support, such as expanding the Earned Income Tax Credit.

The government could take a more active role in education, too. About 11.5 million of the 11.6 million jobs created in the recovery have gone to workers with at least some college education, according to the Georgetown University Center on Education and the Workforce. Hillary Clinton recently proposed a Sandersesque policy to get rid of tuition at in-state public colleges for families making less than $125,000 a year. Other forms of education support could come even earlier in a person’s life. The U.S. government spends 0.4 percent of GDP on childcare and early education, while France, Denmark, and Sweden all spend at least three times more as a share of their economies. It is cheaper to publicly invest in the achievement and health of poor young children than to spend billions trying to remediate them as adults.

And yet, perhaps slightly more effort to remediate would be good. Zakaria surfaced research by Edward Alden and Rebecca Strauss and by a team at Harvard Business School that found that the U.S. spends just 0.1 percent of GDP on retraining, compared to 0.8 percent in Germany and 2.3 percent in Denmark. Job training has a terrible reputation in the U.S., where underfunding and poor coordination between trainers and employers has led to disappointing results. Many workers don’t have time for training, because U.S. welfare policy pushes them to find work immediately, even if it doesn’t lead to a more prosperous career. But several successful training programs, like WorkAdvance in New York City, suggest that in addition to income transfers, the government could also take a more active role in helping displaced workers.

This will sound to many conservatives like a massive plot of redistribution. For much of the last decade, the discussion around that controversial word has assumed that the government is the only force capable of “spreading the wealth around.” But that’s simply not true. Automation redistributes wealth—from routine-based work to work that cannot be automated. Globalization redistributes wealth, too—from activities that can be off-shored to the owners of global supply chains. Economic history is one long story of wealth being created, destroyed, consolidated, and, yes, redistributed.

Future presidents will govern a world sundered by globalization and technology whether or not they are fond of these forces. Of the 27 million net new jobs created between 1990 and 2008, 99 percent occurred in so-called "nontradable" occupations, which is work that must be done locally, such as a treating patients, teaching students, or cutting people’s hair. Multinational businesses have become geniuses at moving their production around the world toward new markets and cheap labor, which often means away from the United States. Companies like GE, Siemens, and Coca Cola will continue to buy robots and hire abroad no matter what the U.S.’s technology and trade policies.

Still, the U.S. worker deserves to be protected. If it’s politically useful to call such a policy protectionism, so be it. Future presidents can welcome the future, because the benefits will be broad, while protecting the vulnerable, because their losses will be acute.