Republicans are in revolt. Economists on the left and right are deeply skeptical. President Trump’s top economic adviser resigned rather than be party to it. The culprit: tariffs, and specifically the president’s decision to slap duties on imported steel (25 percent) and aluminum (10 percent).

Though they are widely vilified, tariffs actually can work, providing protection for a few vulnerable companies, safeguarding entire industries, maybe even encouraging a wholesale reassessment of what counts as fair trade. Tariffs also come with considerable costs and risks, however, and making the gambit work requires a well-defined goal and a winning strategy. And it’s not clear that Trump has the detailed plan needed to make this gamble pay off.

One early estimate of Trump’s plans, for example, uses a variant of a well-respected model to project that the tariffs would eliminate five jobs for every one they save, because the help they offer steel producers is more than offset by the elevated prices that users of manufactured steel, like car manufacturers, wind up having to pay. This is often a risk with tariffs: By raising the price of imported goods, tariffs strain the budgets of companies — and consumers — who buy those goods. In addition, tariffs can provoke an escalating trade war in which foreign countries who resent the new border tax fight back by implementing protectionist measures of their own.

But these risks don’t mean tariffs are doomed to fail; they just require a long-term goal that justifies the short-term cost in jobs and dollars — and a way to reach it.

This kind of targeted tariff helped save Harley Davidson, for example. In the early 1980s, the company was losing market share to smaller, more affordable imports from Japan. Bankruptcy seemed a real possibility until President Ronald Reagan agreed to introduce a severe protective tariff.

Deliberately designed to be fast-acting and short-lived, the tariff started at a steep 49.4 percent before gradually falling back to the normal 4.4 percent rate over the course five years. In the end, it didn’t take that long for Harley Davidson to reorganize its operations, fix manufacturing problems and return to profitability. By year four, they felt secure enough that they actually asked for the tariffs to be lifted early (presumably because the tax had already fallen dramatically and because a show of strength was good PR).

To some observers, that turnaround might still count as a failure because the company recovered not on its own but with the help of regulations that, by their very nature, interfere with the free market, limiting consumer choices and putting upward pressure on prices. But clearly the tariffs accomplished their basic goal, blunting competition from Japan in order to give an iconic U.S. company breathing room to catch up.

Now consider a broader example of tariffs in action, namely the heavily protectionist world of European agriculture. The EU operates under an integrated set of policies designed to ensure a decent standard of living for Europe’s farmers while also guaranteeing a reliable supply of food for European citizens. Among those policies are direct payments to farmers, funding for rural development — and also tariffs, including some tariffs that bite deeply into the pockets of U.S. farmers. When sending goods to Europe, American farmers face an average tariff of 13.7 percent, or nearly three times what E.U. farmers face when exporting their products to the U.S.

All this special treatment for native agriculture comes at a serious cost, of course: Over a third of the E.U. budget goes to support the roughly 5 percent of citizens involved in farming, which is money that can’t be used for other urban or industrial priorities. But what really matters is whether Europeans think these costs are outweighed by the benefits that come with tariffs and other agricultural supports. And in a recent Eurobarometer poll, 52 percent of respondents said they “totally agree” or “tend to agree” that the EU should have trade barriers for agricultural products, compared to 34 percent who disagreed.

Which brings us back to Trump’s decision to impose a 25 percent tariff on steel imports from outside North America and a 10 percent levy on aluminum. Here, too, the defining question shouldn’t be, “What will it cost?” but rather, “What’s the underlying goal, and can it be achieved at a reasonable cost?”

The chosen goal might be quite narrow, along the lines Trump himself outlined when he signed the tariff proclamations last Thursday: “A strong steel and aluminum industry are vital to our national security.” Ensuring that the U.S. can produce enough steel to keep building planes and ships in the event of a military emergency seems like a tailored and well-defined objective, not unlike the aim of the tightly targeted Harley Davidson tariff.

But narrow efforts aren’t always the most successful. The last time the U.S. imposed steel tariffs in an attempt to bolster the industry, under President George W. Bush, the real-world effects proved rather meager. Imports did decline, but seven U.S. steel companies still went bankrupt and the number of workers in the industry seems to have dropped. Partly, this may be because the tariffs didn’t last long enough to allow for the kind of restructuring that U.S. steel mills really needed; they were lifted within two years, after the World Trade Organization ruled them illegal. But it’s also possible the industry needed more help than tariffs alone could provide as a result of high pension costs and a history of inadequate investment.

With the virtue of hindsight, it seems like the time was ripe during Bush’s presidency to pursue a bigger goal: not just helping America’s struggling steel industry but helping many U.S. industries fight off the full force of what’s sometimes called the “China shock” — the sudden rise in Chinese imports of all kinds after the country joined the WTO and gained broader access to U.S. markets. Between 2000 and 2007, America lost about a million manufacturing jobs, affecting industries well beyond steel. A more ambitious plan — one that included steel tariffs alongside other protections and supports — might have helped defend U.S. industries across the board.

Trump may indeed have something bolder in mind, in which case steel and aluminum tariffs may merely be the opening move. At times, he seems ready to embrace a widening trade war, saying that if Europe retaliates against the steel imports, the U.S. could impose a new tax on EU cars. And during his campaign, he floated the far more disruptive possibility of a 45 percent tariff on Chinese imports.

But if the goal is indeed grander — a realignment in global trade that opens space for more U.S. exports and U.S. manufacturing jobs — then tariffs alone probably won’t suffice. Remember that to build a unified agricultural support system, the EU created a complex package of tariffs, subsidies, regulations and rural development aid that all operate in concert.

To ignite a renaissance of U.S. manufacturing, a lot of other things would have to change: The dollar would probably need to fall further, which would help spur exports; countries like China and Germany would have to start saving less and spending more, thus creating more demand for foreign goods, including those made in America; and the U.S. would likely have to pare back its own appetite for imports, including getting Americans to save more money.

Whatever the objective, it needs to be paired with the appropriate tactics. For some goals, tariffs make sense, even if they do come with costs. Ultimately, the only way to assess Trump’s tariff plans is not with a ledger comparing the boon for steel producers against the cost for steel users, but by identifying the broader goal — and seeing whether it gets met.