Trump’s abrupt and unilateral action came amid worsening relations with Turkey, which has continued to detain an American pastor on espionage charges despite the United States’ insistence that he be released.

In a Twitter post Friday morning, Trump said the United States would bump Turkey’s aluminum tariffs to 20 percent and steel tariffs to 50 percent and cited the country’s deteriorating currency, the Turkish lira. “Our relations with Turkey are not good at this time!” he said.

While Trump’s decision is primarily aimed at punishing Turkey over its failure to return the American pastor, Andrew Brunson, the decision spooked markets and raised the possibility he could similarly raise tariff rates on other trading partners that have seen their currencies fall against the strengthening dollar, most notably China. Trump has already threatened to increase tariff rates on $200 billion worth of Chinese goods to 25 percent from 10 percent, in part because of the sharp decline in its currency.

The S&P 500 fell 0.7 percent. The dollar, as measured by the ICE U.S. dollar index, was up more than 0.8 percent, a relatively large move for the currency. Investors flocked to the safety of U.S. government bonds, pushing yields lower. The yield on the 10-year Treasury note fell to 2.87 percent, a sign that jittery investors were hungry for secure places to park their money.

Trump’s mention of the currency suggested he is concerned that a rapid depreciation in Turkey’s currency has essentially mitigated the effect of his tariffs. Since a weaker currency makes it less expensive for countries to export their goods, the tariffs carry less punch. By doubling the rate, Trump’s levies will continue to hurt Turkish metal exporters.

Chad Bown, a senior fellow at the Peterson Institute for International Economics, said the president’s move sent a “worrisome” signal to the world.

“He is tweeting that when a crisis emerges — which could happen in Turkey — his gut instinct is to exacerbate the problem by imposing more tariffs, instead of stepping in with leadership to help resolve the emergency,” Bown said.

Ruhsar Pekcan, the Turkish minister of trade, said Turkey was “deeply disappointed” by the decision to double the tariffs. “The tariffs were groundless when they were announced in June, and remain so now,” Pekcan said.

“The effects of this ill-advised action by the U.S. Administration will not only impact Turkey, but will prove detrimental to American companies and workers as well,” he added.

Turkey ships little aluminum to the United States, but it is the United States’ sixth largest foreign supplier of steel. U.S. companies that source metals from Turkey are bracing for a further impact, after already seeing their prices rise this year as a result of the tariffs.

Joseph Casucci, chief executive of FJM Ferro Inc., which erects steel columns for large residential and commercial building projects on the East Coast, said he expected the president’s decision to further push up the price of steel rebar, of which Turkey is a major supplier. That will put further financial pressure on a range of companies involved in construction, especially mom-and-pop shops that have less ability to stockpile materials, he said. His company has already seen steel costs rise by 35 percent to 50 percent this year.

“I’d love to know when these tariffs are going to subside. That’s the big question in my industry, when does this end?” he asked. “It becomes challenging.”

In his tendency to mix trade goals with other political concerns, Trump has deviated from decades of government practice. He suggested earlier this year that he might soften his trade approach to China in return for Beijing’s help in dealing with the North Korean regime, and repeatedly tied Mexican trade practices with immigration issues.

Ross Wilson, the former ambassador to Turkey, said that while past administrations had used economic tools to accomplish foreign policy goals, the president’s use of a specific tariff threats was unprecedented.

“It’s difficult to tell from the specific words that came out, but it certainly appears to be a political step taken in response to the continued detention of Andrew Brunson and the president’s irritation with that state of affairs,” Wilson said.

Earlier this month, the United States hit two top Turkish government officials with sanctions in response to the pastor’s imprisonment. Brunson, of North Carolina, had been held in a Turkish prison for 21 months and was recently moved to house arrest for health concerns. Turkish officials have accused him of helping out in a failed coup attempt against Erdogan.

Trump had thought he and Erdogan had an agreement that Turkey would release Brunson in exchange for Israel releasing a Turkish woman accused of funding Hamas. The Turkish woman was released, but Brunson remains in Turkish custody.

If the doubling of the tariffs was in fact direct retaliation for the treatment of the pastor, Trump would be undermining the stated rationale of the steel and aluminum tariffs — to protect U.S. metals producers considered vital for national security. That could invite further legal challenges from other countries, who have already brought complaints about the steel and aluminum tariffs to the World Trade Organization.

A White House spokeswoman, Lindsay Walters, said Friday that the president had authorized the increase in tariffs based on a threat to national security.

Steel industry representatives stood by the president, saying that the drop in the Turkish currency would have given the country an advantage over other steel producers and reduced the effectiveness of his trade measure.

“There are limits, of course, but exchange rates and tariff level revisions must be considered to sustain the level of relief provided to America’s steel-makers on the basis of national security concerns,” said Scott Paul, president of the Alliance for American Manufacturing, which represents steel companies and steel workers. “That’s well within the administration’s authority.”

Trump has in the past accused China, the European Union and others of manipulating their currencies to make their exports cheaper for Americans to buy. Trump strongly warned China against further depreciation of its currency as part of a flurry of early-morning tweets several weeks ago.

But the plunge in Turkey’s currency has been triggered by markets, rather than the intervention of politicians seeking to artificially hold their currency down. The lira has fallen more than 40 percent against the dollar this year, as investors’ fears rapidly escalated that the country would not be able to pay its debts.

On Friday, Erdogan appealed to Turks, asking them to use any dollars, euros or gold they owned to purchase domestic currency. The Turkish lira plummeted against the dollar Friday, dropping by more than 13 percent.

Stock markets in the country dropped by more than 2 percent Friday. Prices for Turkish government bonds fell, pushing interest rates higher. The yield on the 3-year lira-denominated Turkish government bond has risen to more than 23 percent recentlys. At the start of the year, the bond was yielding around 10 percent, according to Bloomberg data.

This article originally appeared in The New York Times.

Jim Tankersley, Ana Swanson and Matt Phillips © 2018 The New York Times