NEW DELHI — India joined the European Union and other U.S. trading partners in retaliating against the Trump administration’s tariff hikes on steel and aluminum Thursday by raising import duties on a variety of goods, including almonds, apples and some metal products.

India had notified the World Trade Organization on June 14 of its decision to increase tariffs on more than two dozen goods from the United States. It is a $241 million measure that matches the amount of steel and aluminum import duty expected to be collected from India by the United States through the tariffs imposed by the Trump administration earlier this year. More than a third of the figure comes from almonds; India is the world’s biggest buyer of U.S.-grown almonds.

India finalized its decision during a week when the global trade war escalated, with the United States enacting $50 billion in tariffs on Chinese goods and the European Union imposing $3 billion in levies on such products as U.S.-made bourbon, peanut butter and Harley-Davidson motorcycles. Trump has erroneously called out India for its “100 percent” tariffs on Harleys; in fact India lowered its tariffs on high-end motorcycles from a range of 60 to 75 percent to 50 percent. The new tariffs will go into effect Aug. 4.

Economists noted that the amount of money involved with India’s levies dwarfed in comparison with that of China — U.S.-India trade was $114 billion in 2016, while U.S.-China trade was $648.5 billion — but that the gesture had important symbolism and could presage further strain between the two friendly democracies at a time when their diplomats are working to deepen military ties.

With its move, India is simply “returning the favor,” said Gautam Chikermane, a researcher on international and Indian economic policy at the Observer Research Foundation in New Delhi. But, he said, the move could hurt India’s economic growth as the country diversifies its exports, as well as prompt India “to re-look at U.S. relations as undependable.” That could push India closer to Southeast Asia and the European Union, further isolating the United States, he argued.

The Office of the U.S. Trade Representative said in April that the U.S. trade deficit with India had fallen to $23 billion in 2017, a 6 percent decrease, as U.S. goods exported to India rose nearly $26 billion, up 18 percent from the previous year. The United States’ trade deficit with China last year, by comparison, was $376 billion.

India had sought to be exempt from the new U.S. tariffs on steel and aluminum, arguing that its exports were small in comparison with other countries’, but got nowhere.

In a television interview Thursday, U.S. Commerce Secretary Wilbur Ross defended the Trump administration’s decision to impose tariffs, saying the actions are a defense against years of “bad practice.”

“They’re screaming and yelling — they’ve been spoiled for many, many years, and that game is over,” Ross told Bloomberg Television. “We’re going to fix the problem of protectionism around the world, and we’re going to fix it by making it more painful for those countries to do bad practices than to do the right thing, which is to lower the trade barriers and lower their tariffs.”

Trade representatives from India and the United States are to meet in New Delhi next week. Indian-U.S. trade relations are thorny even in the best of times, analysts say, with the United States pushing for market access and voicing concerns over intellectual property rights, while India wants protections for its citizens on foreign worker visas. Experts say that the Trump administration has been focused on poultry and pork imports as well as India’s imposition of price controls on medical devices.

Swati Gupta contributed to this report.