Theresa May has hit back at Donald Trump’s “unjustified” decision to impose tariffs on steel and aluminium producers, which has pushed the EU to the brink of a trade war with the US.

In her first direct intervention, more than 24 hours after the US announced the tariffs would be imposed on the EU, Canada and Mexico, May said the US should immediately rethink its decision, warning it would have ramifications for US defence projects.

“I am deeply disappointed at the unjustified decision by the US to apply tariffs to EU steel and aluminium imports,” she said. “The US, EU and UK are close allies and have always promoted values of open and fair trade across the world.

“Our steel and aluminium industries are hugely important to the UK, but they also contribute to US industry including in defence projects which bolster US national security.”

May said the EU and UK “should be permanently exempted from tariffs” and Britain would work with the bloc to protect and safeguard workers and industries.

The EU has opened a case at the World Trade Organization after the US imposed a 25% duty on European steel and a 10% duty on European aluminium on Friday.

“We are not in a trade war, but we are in a very difficult situation caused by the United States,” said Cecilia Malmström, the EU trade commissioner. “The US is playing a dangerous game here.”

Wilbur Ross, the US commerce secretary, said insufficient progress had been made in talks with the EU, Canada and Mexico, since the US had agreed a temporary reprieve from the tariffs for the three close US allies after they were unveiled by Trump two months ago.

The Canadian prime minister, Justin Trudeau, issued an immediate tit-for-tat response, announcing tariffs of up to 25% on US imports equivalent to C$16.6bn, the total value of Canadian steel exports last year. The tariffs will cover steel and aluminium as well as orange juice, whiskey and other food products.

The EU is yet to announce its plans for retaliatory measures, although the president of the European commission, Jean-Claude Juncker, has promised imminent action. Targets are likely to be classic US products such as peanut butter, whiskey and Levi’s jeans, though under WTO rules, EU retaliatory measures cannot come into force until 20 June.

The tariffs are particularly damaging to the UK’s hopes of a trade liberalisation deal with the US after Brexit. Liam Fox, the international trade secretary, said the tariffs were “patently absurd” and that it would be “ a great pity if we ended up in a tit-for-tat trade dispute with our closest allies”.

May is expected to raise the tariffs directly with Trump when the pair meet at the G7 in Canada next week, where the issue is likely to dominate, though Downing Street has not ruled out the possibility of an earlier discussion.