BEIJING — The United States and China have sparred repeatedly over trade, in a tit-for-tat skirmish that has shown little sign of abating. High-level talks have stalled, while both sides have been threatening further tariffs in the past week.

But beneath the acrimony, two potential paths for China seem to be emerging, according to participants in the trade negotiations and their advisers. Both would deliver trade wins for President Donald Trump and his more moderate advisers, while also letting President Xi Jinping of China push ahead with his ambitious industrial plan to build national champions in cutting-edge technologies.

A stalemate appears the most likely endgame, with new U.S. and Chinese tariffs staying in place for months or even years. So far, the United States has imposed tariffs on $34 billion of Chinese technology goods and $3 billion of Chinese steel and aluminum, with another $16 billion in the offing. Trump has even mentioned this summer the possibility of tariffs targeting all Chinese exports to the United States.

While the policies have drawn loud complaints from U.S. companies that have become reliant on imports from China, they have been forcing multinationals to rethink their supply chains and start moving them away from China. Over time, such changes could reduce the trade deficit between the two countries and limit national security concerns, two big sources of discontent for Trump.

A negotiated truce is also possible. Although the two sides remain far apart, Beijing has made subtle shifts to a more conciliatory position. China now appears willing to discuss changes to its strategic plan, Made in China 2025, which the Trump administration has identified as a long-term threat to big U.S. industries like aircraft manufacturing, semiconductors and pharmaceuticals.

China’s stance now is that a resolution of trade tensions must not block its further economic progress, but adjustments to Made in China 2025 could happen. The latest trade figures, which came out Wednesday, show that Chinese exports continue to surge, giving Beijing some confidence.“The red line is China’s right to develop, not the concrete industrial policies and measures regarding Made in China 2025,” said He Weiwen, a former Commerce Ministry official who remains one of China’s top trade experts.

To Trump and his aides, China is trade enemy No. 1. In making their case, they point to large, persistent trade deficits, as well as state-owned banks funding potential rivals to U.S. giants in high tech and advanced manufacturing. They also worry that China is engaged in a rapid military buildup that would give Beijing ever more heft in Asia and around the world.

The tariffs address part of the president’s concerns, mainly by reducing U.S. companies’ dependency on Chinese suppliers.

Hundreds of Western companies already have been reconsidering China’s role in their supply chains, according to several people involved in such decisions. Executives are increasingly looking for ways to transfer the final assembly of goods to factories outside China, mainly in low-wage countries elsewhere in Asia or in Mexico.

Doing the final assembly outside of China will allow companies to bypass the new U.S. tariffs. It could also start to cut the deficit with China over the next couple years.

But these moves may not do much to the overall trade deficit of the United States, rearranging it instead to other countries. Companies are just relocating the last steps in production plans to places like Indonesia and Taiwan rather than bringing them back to the United States, where blue-collar labor is costly. Beijing will also retain a lot of leverage, given that the manufacturing of a long list of components, from wires and screws to electric motors and digital controls, will most likely remain in China.

Star Rapid, a company in Zhongshan, China, makes prototypes of products for more than 400 U.S. companies in sectors like electronics, auto parts and medical devices. It has noticed that while many companies are looking at ways to change locations for final assembly, not one seems to be moving the production of entire supply chains. The components typically account for much if not most of the value in products.

“They’re not looking at taking it out of China,” said David Hunter, the company’s chief executive. “They’re looking at where can they do the final transformation.”

During second-quarter conference calls by 192 U.S. and European companies that mentioned tariffs, 17 percent of them said that they had already begun switching suppliers, according to an analysis by Panjiva, a trade data consulting firm. About 14 percent had begun moving some of their own operations.

The Trump administration can afford to stand firm. The U.S. economy has been strong. And the tariffs that U.S. companies face are more than offset by new tax cuts.

Washington may find it has other headaches if tariffs persist. Some China experts worry that the administration’s trade stance could antagonize Chinese policymakers, pushing them toward a more confrontational approach on other issues.

They point out that Xi has assigned the task of defusing a trade war to a team of fairly moderate, Western-educated officials. Failure to reach a deal could weaken these moderates and further embolden hard-liners who advocate continuing China’s broad military buildup and its deployment of ever-harsher domestic security.

“We really need to find a way to embrace China, and encourage the moderate voices here,” said James Zimmerman, a Beijing lawyer and former chairman of the American Chamber of Commerce in China.

Negotiating Made in China 2025 is more complicated. The Trump administration has called for Beijing to halt all subsidies to industries in the program, including low-cost loans from state-owned banks; accept that the United States will have some tariffs on these industries for reasons of national security; end cyberespionage aimed at stealing commercial secrets; and stop demanding that U.S. companies share key technologies with Chinese companies.

While China is not willing to go nearly that far, it could offer some concessions that might provide an ostensible victory.

China has expressed a willingness to change parts of its industrial policy that violate global trade rules. But China’s program falls into some gray areas.

While the World Trade Organization has many rules to prevent governments from subsidizing companies directly, the rules are more vague on whether a state-run banking system can provide preferential loans. Such loans have been the core of Chinese industrial policy for many years, and continue to be under Made in China 2025.

China has also begun exploring ways for Made in China 2025 to finance more research and development, instead of paying for the immediate construction of a lot of factories. WTO rules allow research subsidies.

The dilemma is whether any of these tweaks to Made in China 2025 would make much of a difference and appease the Trump administration.

China may also be signaling a willingness to compromise on tariffs. For much of the trade war, Beijing has matched Washington dollar for dollar on retaliatory measures. The United States and China will each have tariffs in place soon on roughly $50 billion of goods. For the United States, it amounts to a little less than one-tenth of imports from China. For China, it is about one-third of imports from the United States.

Last week, China shifted tack. Faced with U.S. threats of tariffs on two-fifths of China’s exports to the United States, or $200 billion a year, Beijing responded with a threat of tariffs on two-fifths of U.S. exports to China, or $60 billion a year. The change raised the question of whether China might be willing to accept a compromise on tariffs linked to the share of total trade that is taxed in each direction.

China has not yet made any such offer. And Beijing’s recent approach, although a deliberate signal of conciliation, was also just practical: China does not even import $200 billion a year worth of goods from the United States.

“It’s just not a game changer,” Andrew Polk, a founder of Trivium, a Beijing consulting firm, said of the trade dispute. “The trade war, as currently constituted, can go on for some time, and both economies can muddle through it without even strong effects.”