President Trump's steel and aluminum tariffs may invite retaliation against American coal, an industry he promised to revive.

Surging exports have been one of the only recent bright spots in beleaguered coal country. Demand in the United States has shrunk because of competition from natural gas and renewable energy, but the appetite for coal is strong in the fast-growing economies of Latin America and Asia.

But coal country could be harmed if Trump follows through on a vow to impose a 25% tariff on steel imports and a 10% levy on aluminum.

Brazil, a major exporter of steel to the United States, has already hinted at retaliation. Brazil's Industry Ministry warned last week that it may take action to "preserve its national interest" in response to Trump's tariffs.

The statement pointedly noted that Brazil is the largest importer of U.S. metallurgical coal, the type used in steelmaking.

To feed its steel industry, Brazil imported 5.2 million metric tons of so-called met coal through the first three quarters of 2017, according to the U.S. Energy Information Administration. That easily made Brazil the biggest customer for American met coal.

"If someone is trying to retaliate, coal would be an easy target given the president's support toward the industry," said Andy Roberts, a coal analyst at energy research firm Wood Mackenzie.

The threat is bigger than a possible Brazilian tariff. If the Brazilian steel industry suffers because of Trump's tariffs, that could dry up demand for the American coal that Brazil uses to make it.

Related: Oil CEO: Tariffs will help OPEC, hurt U.S. jobs

The good news for coal is that Trump's tariffs could provide a boost as long as there is no retaliation.

If American steelmakers ramp up production to meet increased demand caused by the tariffs, they will probably need more met coal to make the steel.

Higher aluminum output could also increase demand for electricity, which would require more of the thermal coal used by power plants.

But it all depends on how angry American trading partners will react.

"A trade war of any kind in the long run hurts all parties," Roberts said.

Concerns about a trade war have led centrists in the White House and in the business community to try to talk Trump out of the tariffs. It's not clear when a final decision will be announced.

Despite caution from analysts about coal's deep troubles, Trump made saving the industry a rallying call during his 2016 election campaign. "Get ready, because you're going to be working your asses off," Trump told coal miners in a May 2016 speech.

Tony Scott, managing director of analysis at research firm BTU Analytics, said coal would certainly be exposed in a trade war.

"This is a political game: You're trying to undermine an individual's constituent base," said Scott.

The European Union has already threatened to retaliate by imposing tariffs on motorcycles made by Harley-Davidson (HOG), which is based in House Speaker Paul Ryan's state of Wisconsin. The EU also targeted jeans made by Levi's, a company based in Minority Leader Nancy Pelosi's home city of San Francisco, and bourbon whiskey — a beloved business in Senate Majority Leader Mitch McConnell's home state of Kentucky.

Related: Coal country shouldn't count on a Trump-fueled comeback

Trump's deregulation agenda has so far failed to engineer a turnaround for coal, which remains under heavy pressure from natural gas and renewable energy.

The coal industry's saving grace has been foreign demand. The EIA estimates total U.S. coal exports reached 95 million metric tons in 2017, up 58% from the year before.

"The U.S. coal market has gotten some respite from exports while domestic demand has declined," said Dan Klein, managing director of coal analytics at S&P Global Platts.

Murray Energy, a leading producer of thermal coal that has been ramping up exports, is in favor of Trump's tariff plans.

"We fully support the action taken by President Trump to protect steel and aluminum producers in the United States," Murray Energy said in a statement. Robert Murray, the company's controversial CEO, has been a vocal supporter of Trump's efforts to revive coal.

Murray said the "countermeasures" proposed by Brazil "would not directly impact Murray Energy" because it does not produce met coal.

Major met coal producers such as BTU Energy and Arch Coal did not respond to requests for comment.