Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

BEIJING — Fears of a trade war between the United States and China escalated Friday after Beijing warned it was willing to "fight to the end" and retaliate against tariffs announced by President Donald Trump.

The prospect of a financial dust-up between the world's two largest economies has sent stocks tumbling and left the dollar wobbling.

China warned Friday that it could slap tariffs on 128 U.S. products worth a total of $3 billion, including a 25 percent levy on pork products and recycled aluminum imports from the U.S.

This came hours after Trump signed a presidential memorandum that could impose tariffs on up to $60 billion worth of imports from China.

"China does not want a trade war with anyone, but China is not afraid of and will not recoil from a trade war," the Chinese Embassy in Washington said in a statement late Thursday. "If a trade war were initiated by the U.S., China would fight to the end to defend its own legitimate interests with all necessary measures."

The retaliation outlined by China's Ministry of Commerce on Friday was not in direct response to the memorandum that Trump signed Thursday, but rather its reply to earlier steel and aluminum tariffs announced by the president.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Although China has not said how it plans to respond to the latest move by the White House, the country's foreign ministry called it a "totally unilateral and trade protectionist action" during a Friday briefing.

As well as pork and aluminum, China's Ministry of Commerce said it could impose import tariffs on U.S. goods including fruit, nuts, wine and steel pipes.

It said it would roll this out "if China and the United States fail to reach a trade compensation agreement within the stipulated time." It did not give a date for this.

Robert Carnell, chief economist for the Asia-Pacific region at the financial services group ING, said China's likely retaliation to the memorandum could see the tit-for-tat retaliation spiral out of control.

"If the [U.S.] tariffs go ahead as planned, then we believe China will retaliate. It is impossible to imagine that they cannot," he said in an analysis published Thursday. "And then we expect the U.S. to retaliate further, etc. This can turn ugly on a global scale very quickly."

An opinion piece in China's Global Times newspaper said Trump was "playing with fire" and warned that Chinese citizens would be able to outlast the American people if it came to a war of attrition on trade.

The Chinese, it said, "possess a level of endurance that the U.S. cannot compete with."

Meanwhile, on China's social media platform Weibo, one user wrote: "I am waiting for China's victory in this trade war and Trump being kicked out of the presidency."

Another added: "It's time to test Chinese people. Use Chinese products and support our country."

Other analysts in Asia said the possibility of a trade war was unlikely.

"It is not something either country can afford or either country believes is worth pursuing," Wang Jiangyu, an international law professor at the National University of Singapore, told NBC News on Friday.

Wang said that China's announcement should be seen as a warning to the Trump administration.

"China is ready to negotiate but China is also ready to retaliate," he said.

Eric Baculinao and Ed Flanagan reported from Beijing, Alexander Smith reported from London.