In the run-up to Hong Kong’s return to China in 1997, the world wondered what officials in Beijing would do with the place. Would Hong Kong’s dynamism and openness catalyze change in China, or would the Communist Party try to remake the freewheeling city-state in its image?

Sixteen years on, we know it’s more the latter than the former. Beijing has shackled Hong Kong with one bad, handpicked leader after another. China’s commissars and their local lackeys continue to push anti-sedition laws, patriotic education and Mandarin on 7 million people who seek democracy and prefer Cantonese.

Now, the “one country, two systems” principle that Deng Xiaoping negotiated with U.K. Prime Minister Margaret Thatcher decades ago faces perhaps its biggest challenge: China’s wobbly economy. A downturn on the mainland threatens to erode Hong Kong’s AAA credit rating, and to alienate the city’s population once and for all.

After the handover, China’s Communist Party carved out a tacit deal with Hong Kong’s citizens. It boiled down to, “We’ll make you richer with our 10 percent-plus growth, if you don’t push us too hard on this democracy stuff.” The relationship hasn’t always gone smoothly. The giant protests of 2003, one drawing more than half a million people, and many smaller ones since -- including one this week that drew tens of thousands -- show that the balancing act requires constant calibration.

The arrangement could go very much awry as China slows. China’s credit clampdown is causing wild stock swings in Hong Kong, whose entire economy is underpinned by asset prices. Last week, Moody’s Investors Service cut its outlook for Hong Kong’s banking system to “negative” as analysts assess lenders’ growing exposure to borrowers in China.

Mainland Exposure

Inflation-adjusted interest rates in Hong Kong have been negative since early 2009. That has led its banks to become increasingly reliant on mainland clients -- cash-rich investors who have been buying all the Hong Kong property they can. Hong Kong banks boosted mainland exposure to 16.5 percent of consolidated total assets by the end of 2012, compared with 9.8 percent in 2009.

Lenders mitigated some risk by requiring collateral and bank guarantees. Yet the timing of Hong Kong’s shift toward mainland borrowers was as bad as it gets in banking. It came just as China’s dueling asset bubbles fostered a pre-subprime-crisis mindset -- property prices will always go up -- among borrowers. Now, as China reins in a shadow-banking industry that makes the U.S.’s off-balance-sheet vehicles of the late 2000s seem comprehensible, Hong Kong is in a tight spot.

Surging nonperforming loans at Chinese banks are but one ominous sign. They rose for six straight quarters through March 31, the longest deterioration in at least nine years. The increase is sure to accelerate in the coming months as the People’s Bank of China tries to regain control of money-supply growth. That’s a huge wild card even for a banking system as well regulated and managed as Hong Kong’s.

The bigger issue is economic contagion, which could undermine the AAA rating that Standard & Poor’s has given Hong Kong. That might sound like a reach considering that in a world of red ink, Hong Kong boasts a budget surplus of 1.7 percent of gross domestic product. But Hong Kong’s exposure to, and reliance on, China will change the calculus quickly and radically.

Hong Kong is a fascinating proxy for how quickly and deeply Chinese GDP falls over the next one or two years. If Chinese growth slides toward 5 percent, as is likely, Hong Kong will be hit hard. A crisis would dent the goodwill that the Communist Party has long used to buy the city’s patience, and it would inspire soul-searching about Hong Kong’s precarious place in the greater China region.

Diplomatic Masterstroke

That was very much on display last month with the Edward Snowden affair. Together, Hong Kong and China pulled off a diplomatic masterstroke by letting the fugitive American board a flight for Moscow. Yet Hong Kongers widely believe Beijing made the call, not their city’s chief executive, Leung Chun-ying.

Since 1997, Hong Kong’s leader has been a glorified mayor beholden to the Communist Party, and Leung is barely more popular than the city’s last three. He miscalculated as soon as he took office in July 2012, when he tried to force-feed the mainland’s “patriotic education” program to Hong Kong’s students.

Leung also got terrible headlines from efforts to block personal data on company directors, a step that could enable mainland bigwigs to hide ill-gotten gains in Hong Kong. Leung bowed to public pressure and shelved both plans, but Hong Kong’s ability to resist China’s influence is weakening. Already pressure from Beijing has had a chilling effect on the Hong Kong media, which increasingly exercise self-censorship on controversial issues.

Hong Kongers are proud of their Chinese heritage; it’s the mainland’s communist system they can do without. No one envies Leung’s task. It won’t be easy to bridge the gap between a China that wants greater obedience; a Hong Kong populace that wants liberty; and international investors who view Hong Kong’s laissez-faire economy as the freest in the world. Leung’s job will grow even harder if Chinese economic chaos starts to drag Hong Kong down, as well.

There’s more at risk here than Hong Kong’s pristine credit rating. If it’s not careful, China may lose 7 million votes of confidence, too.

(William Pesek is a Bloomberg View columnist.)

To contact the writer of this article: William Pesek in Tokyo at wpesek@bloomberg.net.

To contact the editor responsible for this article: Nisid Hajari at nhajari@bloomberg.net.