China isn't doing much to cool concerns about a trade war with the United States.

"China would fight to the end to defend its own legitimate interests with all necessary measures," China's embassy in Washington said in a statement late Thursday. "China is not afraid of and will not recoil from a trade war."

President Trump announced earlier that his administration would impose tariffs on $50 billion of Chinese exports to the United States to retaliate against Chinese theft of intellectual property, including software and patents. The administration will also restrict Chinese investment in the United States.

The statement from the Chinese embassy said Trump's trade action was "self-defeating" and would hurt American companies, consumers and financial markets.

"We urge the US to cease and desist, make cautious decisions, and avoid placing China-U.S. trade relations in danger with the purpose of hurting others that eventually end up hurting itself," the statement said.

Fears of a trade war between the world's two largest economies rocked the stock market on Thursday. The Dow fell 724 points, or almost 3%.

Related: Dow plunges 724 points as trade war fears rock Wall Street

The administration said it would announce in the next 15 days which products would be subject to tariffs.

After a seven-month investigation, the office of the US Trade Representative concluded that China hurts US technology companies in a variety of ways.

For example, when American tech companies want access to China's market, China forces them to enter joint ventures with its own companies, the USTR said. The American companies are forced to share software, patents and tech secrets, which Chinese firms then steal and use to push the Americans out of the market.

The Chinese embassy in Washington said that China "has demonstrated sincerity in making reasonable suggestions to the US, and has made great efforts to address the current trade imbalance between China and the US."

US officials widely agree that China has stolen US technology and trade secrets. Many economists say the administration's diagnosis of the problem is correct. But they fear that widespread US tariffs, and Chinese retaliation, will raise prices significantly for Americans, hurt the economy and kill jobs.

Trump administration officials say fears of a trade war are overblown. However, they concede they're worried about retaliation.

Trump's crackdown on China came shortly after US Trade Representative Robert Lighthizer announced that more countries will be exempt from the steel and aluminum tariffs that Trump announced three weeks ago.

Those penalties — 10% on aluminum imports and 25% on steel imports — take effect Friday. But they will not apply to the European Union, South Korea, Argentina, Brazil or Australia. Mexico and Canada were already exempted.