Tens of thousands of Hong Kong residents gather to mark the 25th anniversary of the military crackdown in Tiananmen Square.Bobby Yip / Reuters

The first time I encountered members of Hong Kong’s student union was in late April 1989, when I attended an early meeting of our own, unofficial Beijing version. We were planning a big march to Tiananmen Square, calling for democratic reform. They were there among us, pledging to bring our message to the outside world, no matter what might happen. You couldn’t help but be impressed by their commitment to the cause, how swift they were in coming to our aid, how organized they were.

For the next several weeks, we worked together; they helped us perfect our student-union charters, which were modeled after their own, and ran the most efficient supply station in the square, with donations coming from Hong Kong itself. They told us of their experiences in protests of previous years, forgotten by many people today, demanding a “democratic handover” of Hong Kong from Britain to China.

Then June 4 came—the crackdown on the demonstrations at Tiananmen Square, and elsewhere across China. In Black Night in June, a short film by the Canadian journalist Arthur Kent released to mark the 30th anniversary of the repression, one particularly poignant scene comes on the night of June 3, 1989. Lam Yiu-keong, then the general secretary of the Hong Kong Federation of Students, sits with a female student from Beijing Normal University at the foot of the Monument to the People’s Heroes, a tall obelisk at the center of Tiananmen Square, awaiting the unthinkable.

I have thought of those days many times in recent months, as Hong Kong’s residents have stood up to China, once again, this time against an unpopular law that would allow criminal suspects to be extradited to the mainland. Their protests have lasted for more than three months now, and finally won some reprieve today when Carrie Lam, Hong Kong’s chief executive, withdrew the bill, satisfying one of five demands from protesters. Throughout, they have held firm on the need for comprehensive democratization in their city.

Hong Kongers have long had an uneasy relationship with the Chinese Communist Party (CCP) because of the party’s attitude toward the city, which has been to extract as many economic benefits from it as possible, with little or no concern for those who live there. In the late 1960s, as Mao Zedong launched the Cultural Revolution on the mainland, communists in Hong Kong revolted against the colonial authorities, leading to violent protests in which dozens died and thousands of demonstrators were jailed. Beijing’s decision not to take the colony back gave its then-rulers a free hand to crack down hard, and the party’s reputation in Hong Kong was badly damaged: Its rhetoric of anti-imperialist, anti-colonial struggle was exposed as hypocrisy.

In the following two decades, local unions, linked to neither the CCP nor the rival Nationalists in Taiwan, emerged as powerful social forces. Hong Kong not only became wealthier, but working conditions improved considerably and continuously, as did social-welfare programs. A surge in Cantonese-language cinema, music, and publishing fostered a growing local identity.

Meanwhile, London and Beijing negotiated the deal that would formalize Hong Kong’s handover to China. Beijing refused to allow representatives of Hong Kong to take part, and once the Sino-British Joint Declaration was issued, a committee of 59 was formed—36 mainlanders and 23 Hong Kongers—to draft the Basic Law, what would be the city’s de facto constitution. The lack of grassroots participation in the initial negotiation triggered calls for a democratic handover and a campaign advocating direct elections in 1988, led by union leaders and longtime activists such as Szeto Wah and Martin Lee, two founding members of Hong Kong’s Democratic Party.

Similar demands for a democratic handover, as opposed to Beijing’s state-dominated decolonization, brought many Hong Kongers, such as the young student Lam and others whom I met 30 years ago, to Tiananmen Square, and even more onto Hong Kong’s streets. The first ever march of more than 1 million people in the city’s history took place in late May 1989 and, soon after the CCP’s bloody crackdown, Hong Kong held a general strike. The intertwined fates of Tiananmen and Hong Kong can best be seen in the annual candlelight vigil that has drawn hundreds of thousands of people on June 4 each year, for 30 years, without interruption.

Though Hong Kongers had rebelled against the authorities before, the Tiananmen protests were what awakened their political consciousness, and their sense of the difference between popular sovereignty and state sovereignty became acute. The CCP drew the opposite lesson, becoming so fearful of popular political mobilization that it insisted that Hong Kong’s laws be effectively unchanged from 1984, when the Sino-British Declaration on the city’s handover was agreed, through to the official transfer in 1997, unless reforms were authorized by the Party itself. It even demanded that a labor law passed in early 1997 guaranteeing the rights of collective bargaining be scrapped, which it was soon after the handover.

Since then, Beijing has sought to pass an antisedition law, attempted to promulgate “patriotic education” in Hong Kong, and restricted the territory’s ability to choose its chief executive. The heavy-handed, unyielding stance Beijing has taken against this summer’s protests has only served to “pour oil on the flames,” as a Chinese proverb says, pushing Hong Kongers into a corner: They must fight for their freedom once more, or become slaves to Beijing’s imperial rule.

How much can the ongoing demonstrations in Hong Kong be compared to Tiananmen? On the protesters’ side are plenty of similarities. For one thing, the “silent majority” of the population did not always remain passive or follow party orders in 1989. Ordinary Beijing residents were the ones who risked their lives to brave the fire as tanks and machine guns made their way to the square. Much of the same is happening in Hong Kong today: Students and young people have been at the forefront of the rallies, but a wide array of residents have joined them, including civil servants, accountants, medical personnel,  the elderly, and others.

Yet the differences are also significant. The regime in Beijing has changed a lot in 30 years. The Chinese economy today is far larger, and Hong Kong’s proportion of it substantially smaller. The tools available to the state are also much greater than they were in 1989, with a more powerful security apparatus and myriad economic levers at its disposal. At the same time, Hong Kong’s institutional infrastructure is far more advanced than any other Chinese city in its ability to serve Beijing’s global ambitions. Hong Kong still operates a U.S.-dollar-denominated currency market that is part of the global financial system, the only one in China, and is key to Beijing’s many projects worldwide, not least the Belt and Road Initiative. So Beijing would be loath to go too far in eroding these institutions. Donald Trump has also linked the CCP’s response to the protests to his ongoing trade war with China.

Beijing has done well to grant Hong Kong’s protesters some of what they want in withdrawing the extradition bill. Yet China must also investigate police abuse, give amnesty to arrested protesters, and reopen political reform toward comprehensive universal suffrage in the territory.

Of course, it may not, reckoning it can wear down Hong Kong’s protesters. Given the city’s history and its rapidly politicized population, that would be a miscalculation.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.