For many years after regaining control of Hong Kong from Britain in 1997, China mostly respected the territory’s institutions. That is no longer the case, as Beijing’s heavy hand during the recent protests in the city has made obvious.

So what changed? In 1997, China needed Hong Kong. China had not yet been allowed to join the World Trade Organization, so Chinese exporters had limited access to the global market. Hong Kong was the solution: It served as a channel for entrepôt trade — goods from China could enter the territory’s ports and then be sent as exports from Hong Kong to the rest of the world, thus evading the trade restrictions imposed by member nations on nations outside the organization.

When China became part of the trade organization in 2001, entrepôt trade through Hong Kong lost its importance. By some estimates, nearly half of China’s trade went through Hong Kong in 1997, today that figure is less than 12 percent.

In terms of total size and wealth, Hong Kong has also shrunk relative to China, which has experienced more than three decades of astoundingly high economic growth. In 1997, Hong Kong’s economy was one-fifth the size of China’s, and its per capita income was 35 times higher. By 2018, Hong Kong’s economy was barely one-thirtieth the size of China’s. Hong Kong is still richer, but the gap is narrowing, with its per capita income now five times higher than China’s.