After months of threats and skirmishes, the trade war between the United States and China is about to get serious.

On Friday, the world's top two economies are due to exchange fire by hitting $34 billion of each other's exports with steep new tariffs, the first moves in what may become a devastating cycle of retaliation.

The planned measures have already unsettled markets and provoked warnings from companies of damage to their bottom lines and higher prices for consumers.

President Donald Trump and his advisers argue the tariffs are necessary to pressure China into abandoning unfair practices such as stealing intellectual property and forcing American companies to hand over valuable technology.

Beijing denies it's in the wrong and says it's ready to fight a trade war until the end.

"The United States will be opening fire on the whole world and also opening fire on itself," Chinese Commerce Ministry spokesman Gao Feng told reporters on Thursday. He warned that the US tariffs will hurt foreign companies that export goods from China to the United States.

Underpinning the dispute about technology is Trump's anger at America's $375 billion deficit in goods trade with China. But after three rounds of negotiations between the two sides, including a Chinese pledge to significantly increase purchases of American products, Trump decided to go ahead with the tariffs.

Related: China's economy shows signs of slowing. A trade war won't help

The clash with China comes as the Trump administration is also fighting over trade with American allies such as Canada and the European Union. US tariffs on steel and aluminum imports have provoked retaliatory measures against billions of dollars of American exports. Trump has added to the tension by threatening new tariffs on cars.

China won't 'fire the first shot'

The US tariffs on China target more than 800 different items, including industrial machinery, medical devices and auto parts. Beijing plans to fire back by hitting 545 American products such as SUVs, meat and seafood.

The US measures are expected to take effect first, shortly after midnight ET on Friday. That's around midday in Beijing, and the Chinese government will wait until then to retaliate, as it "will never fire the first shot but will be forced to strike back," Gao said.

The United States is also set to go ahead with tariffs on another $16 billion in Chinese exports later in the summer, and China has vowed to retaliate against US goods of equal value.

Economists say that if the tariffs stop there, the impact on both economies will be small.

But Trump has said his administration will respond to retaliation from Beijing with much bigger waves of tariffs, raising the prospect of worsening tit-for-tat reprisals. On Thursday, he raised the possibility of tariffs on almost $500 billion more of Chinese goods.

He described the possible escalation to reporters aboard Air Force One: "Thirty-four, and then you have another 16 in two weeks and then, as you know, we have 200 billion in abeyance and then after the 200 billion we have 300 billion in abeyance. OK?" Trump said. "So we have 50 plus 200 plus almost 300."

The US imported $505 billion of goods from China last year.

Related: Daimler warns US-China trade war will hit its profits

For the time being, analysts say it's hard to see either side backing down.

"By threatening unilateral action without having any allies and not reducing domestic discord on trade, the Trump administration has invited China to stand tough," said Scott Kennedy, director of the Project on Chinese Business and Political Economy at the Center for Strategic and International Studies.

"The Trump administration also believes that at least starting a trade war is in its interests; the US economy is strong enough to endure a crimp in trade, the president's domestic political standing is as strong as ever amongst Republicans, and pushing China hard on trade may help restore US credibility on other issues," he added.

Who can take the most pain?

The two giant economies appear ready to see which side can endure the most pain. The damage could also spread to other economies, hurting business confidence and prompting companies to delay investments.

Fears over the impact of the trade clash have rattled markets around the world, with China's stocks and currency coming under particular pressure in recent weeks.

Kennedy say he thinks the Trump administration's enthusiasm for the conflict "will erode as the economic pain and political fallout from a trade war begin to take hold. At that point, the US will be more interested in negotiations, and the Chinese side will also want to come to the table."

Related: US-China trade war will spill into other Asian economies

But reaching a deal that's palatable to both sides will be tough. For example, the US government wants China to rein in government subsidies for policies like "Made in China 2025," which seeks to pump hundreds of billions of dollars into industries such as robotics, electric cars and computer chips with the aim of becoming a global leader.

Analysts say China is unlikely to budge on those plans, which it sees as crucial for developing its huge economy.

"It's still hard for me to believe the Trump administration could develop and negotiate an overarching package with China that genuinely sticks," Kennedy said. "And so I'd expect the two sides to pursue some sort of face-saving deal that looks good on paper but is not enduring."

-- Steven Jiang and Kevin Liptak contributed to this report.