June 29, 2017 12:31 AM EDT

The stroke of midnight rang in a new destiny for Hong Kong on July 1, 1997. After 156 years as a British colony, Hong Kong, one of the planet’s most dynamic cities, became a special territory within China under a template called “one country, two systems.” The idea was that Hong Kong would pretty much run itself so long as it did not impinge on the rest of China. It was a noble sentiment, as well as a practical way to enable two entities that had evolved separately and differently to co-exist. But the first 20 years since Hong Kong returned to Chinese sovereignty have been characterized, above all, by a never-ending test of the faith and execution of that template, that idea, of “one country, two systems.”

China has gone on to become the world’s No. 2 economy and a superpower second only to the U.S. Hong Kong — once renowned globally for its singular money-making obsession and prowess — has become a politicized and fragmented society, much of it precisely because of its place and status as a a Chinese territory. For many if not most of Hong Kong’s citizens, maintaining its freedoms and way of life is paramount. For Beijing, it’s national sovereignty and security. In the past 20 years, the two missions have often clashed, with Hong Kong increasingly the loser. A range of emotions, mostly discrete yet also overlapping, prevails in the city — from pride at being part of a great nation to anxiety about being swallowed up by that same great nation.

Perhaps the most apt metaphor for Hong Kong’s first 20 years within China is a roller coaster ride: tumultuous, giddy, jarring. Here are some images of the highs and lows of those two decades.

More Must-Read Stories From TIME

Contact us at letters@time.com.