During a visit to the United Kingdom last year, Chinese president Xi Jinping not-so-subtly called on Britain to remain in the European Union.

“China hopes to see a prosperous Europe and a united EU, and hopes Britain, as an important member of the EU, can play an even more positive and constructive role in promoting the deepening development of China-EU ties,” said China’s foreign ministry, paraphrasing Xi’s remarks (paywall).

Xi’s remarks about Brexit were a major break from tradition. China doesn’t typically comment on the domestic affairs of other countries. This is in hopes that other countries will also refrain from commenting on China’s territorial disputes with its neighbors, human rights record, or heavy handedness toward Hong Kong and Taiwan.

Behind Xi’s opposition to the UK leaving is China’s difficult trade situation with the European Union. The European Union is currently China’s largest trade partner. In 2015, it sent 350 billion euros (about $389 billion) worth of imports into the trading block.

The EU has been a key source of growth for China, too. The EU’s imports from China more than doubled between 2005 and 2015.

But some members of the European Commission want tighter trade restrictions on China. European lawmakers voted in May to deny China “market economy” status, a designation that would make it more difficult to place tariffs on Chinese goods. China was supposed to receive the designation after its entrance into the WTO in 2001.

The EU has also been trying to increase tariffs on China’s super cheap state-supported steel, whose overproduction has upended global markets. The UK has been blocking these measures since 2014, the Independent reported citing EU Council documents.

UK chancellor George Osborne, meanwhile, promised a “golden decade” for the China-UK relationship in 2015, if only the two countries would “stick together.” His optimistic speech, delivered at the Shanghai Stock Exchange just weeks after one of the worst stock market meltdowns in Chinese history earned him the derision of economists and analysts, including many fellow Brits.

With the UK gone, the EU’s restrictions on China could get a lot tougher. Beijing, and Chinese citizens, view Britain’s departure from the EU as dangerous for that reason. In the run-up to the referendum, party mouthpiece, The Global Times, pointed out the risks of Brexit to the Chinese economy:

The EU is the biggest trading partner of China, while the UK is the one with the highest degree of free trade in the block and it has backed China’s market economy status. London is an important hub of the internationalization of the yuan. A Brexit will undoubtedly cast a shadow on the trade relationship between China and the EU.

With its largest advocate officially out, Beijing will now face more even pressure to liberalize its economy, lest it risk losing access to its most important trade partner.