SEOUL — The US and South Korea agreed to revise a trade pact sharply criticized by US President Donald Trump, Seoul said on Monday, with US automakers winning improved market access and Korean steelmakers hit with quotas but avoiding hefty tariffs.

The planned changes in the US-Korea Free Trade Agreement (KORUS) come as Mr. Trump seeks to strike a balance between his domestic agenda and the need to work closely with Seoul to try to contain a nuclear-armed North Korea.

In April, Mr. Trump told Reuters he would either renegotiate or terminate what he called a “horrible” trade deal that has doubled the US goods trade deficit with South Korea since 2012.

The agreement means South Korea will be forced to cut its steel exports to the US by 30% of past three years’ average, in exchange for becoming the first US ally to receive an indefinite exemption on steel tariffs imposed by Mr. Trump.

Mr. Trump’s action on steel and aluminum, along with plans to slap tariffs on up to $60 billion in Chinese goods had fueled concerns of a damaging global trade war.

“We had heated discussions,” South Korean Trade Minister Kim Hyun-chong said at a media briefing in Seoul.

“The latest agreement removed two uncertainties,” he said, referring to steel tariff exemptions and KORUS renegotiation.

Last week, Mr. Trump temporarily excluded six trade partners, including Canada and Mexico, Australia and the European Union from higher US import duties on steel and aluminum which came into effect on Friday.

The import duties, of 25% on steel and 10% on aluminum, were mainly aimed at curbing imports from China.

South Korea has received a quota of about 2.68 million tons of steel exports, or 70% of the annual average Korean steel exports to the US between 2015-2017, which will be exempt from the new tariffs, the ministry said in a statement.

South Korea is not allowed to export steel products exceeding that quota to the US market, a ministry official said.

“This leaves a bad precedent of exchanging steel tariffs — which is a breach of international trade law — for a legitimate free trade agreement, in negotiations,” said Wonmog Choi, professor of law at Ewha Womans University.

South Korea is the third-largest steel exporter to the US and the world’s top importer of Chinese steel, leading to concerns it was a conduit for China’s excess capacity.

Mr. Trump was elected in 2016 after promising to punish what he saw as unfair trade practices by other countries, particularly China.

Alarm over a possible trade war between the world’s two largest economies has chilled financial markets as investors foresee dire consequences should trade barriers go up. — Reuters