Chinese leaders probably figured Donald Trump would be easy to manipulate—but they didn't think he'd follow through on some of his campaign promises.

For about two months the US has been inching, quietly at times, toward a long-feared trade war with China. The roots of this go back years, as America has long accused China of "dumping” its steel on US markets. At the same time American companies, especially tech firms, have complained about Chinese rivals stealing trade secrets. Donald Trump spent a good portion of his campaign attacking China and telling his supporters the country was ripping the US off. Now he appears to be making good on his promise to get tough on China. The problem being that China is likely to be tough right back.

In early March, the Trump administration announced new tariffs on aluminum and steel (these affected all imports, not just Chinese ones, though Trump later excluded Mexico and Canada). China responded weeks later with planned tariffs on over 100 American goods, mostly agricultural, worth about $3 billion. Around the same time, Trump proposed some $50 billion more in tariffs on tech items; he also threatened to restrict Chinese tech firms’ access to America. China hit back with another $50 billion in proposed tariffs on major US exports to China, like soybeans, cars, and small planes. Trump escalated things at the start of April with a proposed $100 billion more in tariffs on potentially hundreds of yet-to-be-named Chinese goods.

This moves have already spooked the American farmers and others who may have to suffer the consequences of those Chinese tariffs. But as the dispute develops and deepens, the big unknown is Beijing—the Chinese view of Trump and his recent trade moves and their resulting strategy will likely be huge for the world economy going forward. So what do we know about their perspective on this slow-building mess?

Given how much Beijing bashing Trump did on the campaign trail, China has been oddly mellow about all things Trump since his election. This, as Benjamin Carlson recently argued convincingly in The Atlantic, is likely because the Chinese leadership figured it could handle Trump. Chinese officials largely saw Trump as all bluster, someone they could use as proof of the problems inherent in capitalist democratic systems, trust not to carry through on his biggest threats, and probably strike some pragmatic deals with.

Until recently, Trump seemed to be playing into that narrative. Chinese President Xi Jinping (who recently consolidated his power for the foreseeable future) seemingly proved in his first meeting with Trump that he could lead him by the nose on North Korea policy and won him over with flattery and pageantry when Trump visited China last November. After that trip, Trump acted as if a few non-binding agreements and repackaged old deals on trade and investment was some major achievement. By the start of 2018, he seemed ready to strategically forget most of his Chinese trade saber rattling.

Chinese leaders, longtime China watcher Robert Daly told me, took Trump’s “satisfaction with their hospitality and declarations of admiration for Xi Jinping” as signs “that he would not disrupt” the status quo.

Within that context, Beijing likely was not surprised or irked when Trump made some noise in early March. The US is only about 1 percent of the market for China’s steel, itself of waning importance to the Chinese economy. So Trump’s steel tariffs were hardly the end of the world. China responded with a measured retaliation, firm words about its readiness to fight a trade war, and a nod to its openness to negotiations. China also offered minor concessions to the US, promising to reduce some tariffs and vaguely, at some point in the future, improve conditions for foreign investors looking to move into their markets.

It seemed like the setup for a bit of rehearsed political theater: Trump does something that seems to deliver on campaign promises, but is more bark than bite. China shows it won’t cave to Trump to save face, but offers him something small to take home. Both sides shake hands and wave to the cameras, status quo intact.

But Trump didn’t take China’s olive branch. Instead he escalated with more tariffs, and openly claimed that he wanted to get tough not just on trade disparities, but on China’s tech development strategy. This was a big deal: China under Xi has decided that its future lies not in being a behemoth exporter of basic goods, but a tech leader. The state encourages local IT development by limiting outside investment, offering massive subsidies, and all but requiring foreign firms to work (and share their secrets) with local companies to access Chinese markets. This policy has long been irksome to American industry heads and politicians. But it is so core to the Chinese vision of the future that it’s been difficult to substantively push back on.

Outwardly, China is holding its standard line of negotiations. It’s re-stressed its willingness to fight if the US starts a trade war, opened avenues for negotiation, and nodded to a few more potential tariff and foreign investment concessions. “Beijing is prepared to make some adjustments to its investment and intellectual property policies,” said Daly, though these concessions will almost certainly not exceed the reforms China is already willing to make in the long term, or speed them up by much.

But multiple reportsindicate that Chinese officials no longer feel like they know what Trump’s game is. “Trump’s threats to further escalate tariffs may have surprised them,” noted Hardy.

The inconsistencies in Trump’s rhetoric and actions may make it difficult for China to get a read on Trump. He continues to contradict his own administration’s rulings on issues like whether China should be considered a currency manipulator. He flip-flops on whether he wants to re-enter the Trans-Pacific Partnership trade agreement, which would be to China’s detriment and which he was vehemently opposed to in 2016. He has an ever-changing staff largely composed of political outsiders, making it difficult for Chinese officials to find anyone in DC to build relationships with or rely on for insights into the way Trump thinks.

“China,” said Daly, “is learning not to have expectations for President Trump.”

“I am skeptical that Beijing has a cohesive plan” on how to handle Trump now, said Hardy, “because Trump’s position on trade has veered so dramatically and in an unpredictable fashion.”

Regardless of Trump’s intentions, China feels it cannot give in to his demand that it radically rework its tech sector development policies. Xi needs to show that he stands by a cornerstone policy. (The Chinese leader reportedly toned back a speech on economic reforms earlier this month so as not to seem like he was giving in to any of Trump’s demands.) And the Chinese security apparatus views that development strategy as key to the nation’s military future.

Some analysts seem to believe that if Trump continues escalating this trade dispute and China doesn’t find some grand new strategy, it will be forced to cave on major policy points. Thanks to the disparity in trade between the two countries, the US has more Chinese imports it can slap tariffs on than vice-versa. The Chinese economy is also much more reliant on trade than the American economy. All this means that there may be a kind of logic to Trump’s hardline yet opaque tactics. He might be backing Chinese leaders into a corner where, unsure of how to game him, they have to make hard concessions to avoid serious economic pain.

That may be too simplistic or optimistic a reading, though. “China has vulnerabilities and the US has leverage,” admitted Daly. “But not so much that it can dictate terms or insult China at will.”

China likely trusts that its political system allows it to weather more pain than the US, especially with Trump already being embattled and unpopular. Chinese leaders also know that targeting American farmers will squeeze Trump’s base directly. “China will likely try to enlist key exporters to China, such as soybean producers, and perhaps state-level partners such as California, to support its efforts and pressure the US government for an end to the trade friction,” said Hardy.

“China has noted the Trumpian pattern of bold declarations that subsequently get rolled back as he is lobbied and otherwise informed,” added Daly. This suggests he may be prone to such a tactic.

Plus, Chinese authorities are not limited to one-to-one tariff responses. They can really mess with Americans heads by opening up investments and market access to companies that compete with American exporters as punishment for Trump's dickishness. That could even be coupled with decreased access for some American exporters, like carmakers.

A full-blown trade war will not be painless for China or America. But so long as Trump keeps playing the unpredictable aggressor, he’s also likely to piss off many other US trade partners who worry they’ll get caught up in his protectionism. China can then take the moral high ground, casting itself as a champion of global trade norms—even though it is quite protectionist itself. The end result may be a fraying of the trade alliancesAmerica could have used to take China to task for its tech policies, and an increase in China’s global standing.

“Much of the world is so appalled by President Trump’s methods and speech that it hesitates to support American positions it would otherwise agree with,” explained Daly. “Opposition to Trump is resulting in global credulity regarding Xi Jinping.”

Domestically too, Trump’s aggression may be a gift to Xi. “Chinese leaders have long used external events to divert public attention from domestic problems,” said Li. Trump has “provoked an new round of nationalist sentiment in support of… the central government.”

China, then, may not need a good grasp on what Trump is thinking or how hard he’s willing to push. Its leaders just have to react in measured fashion, putting the screws to the US while building faith abroad and consolidating power at home. “The ball is in America’s court, as far as China is concerned,” argued Daly. “Beijing is waiting to see which actions the US definitively takes,” not just what Trump spews out, and will act accordingly.