Protesters supporting Chinese Nobel Peace Prize winner Liu Xiaobo stand outside China’s Liaison Office in Hong Kong on Tuesday. Some wear masks depicting the human right activist, who was recently released from prison to get treatment for cancer. (Bobby Yip/Reuters)

As Chinese President Xi Jinping arrives in Hong Kong to celebrate the 20th anniversary of Hong Kong’s handover to China, many citizens are out protesting the erosion of Hong Kong’s autonomy.

Beijing and Hong Kong officials, meanwhile, plan to commemorate the June 30, 1997, transition with fireworks, flag-raising ceremonies, carnivals, concerts, exhibitions and more. Here are five key points to understand the tense relationship:

1) The Tiananmen movement of 1989 fundamentally shifted Beijing-Hong Kong relations.

When London and Beijing announced the Sino-British Joint Declaration on the future of Hong Kong in 1984, the “one country, two systems” model promised to give Hong Kong “a high degree of autonomy” from mainland China. Hong Kong, a former British colony, would revert to Chinese rule in 1997 as a “Special Administrative Region” (SAR).

In 1989, the fear of “today’s Tiananmen, tomorrow’s Hong Kong” drove many in Hong Kong to provide moral and material support for student demonstrations across China. After the Tiananmen Square protests, Beijing shifted its Hong Kong policy sharply, taking a much tougher stand on how Hong Kong would be governed after 1997.

The Basic Law, Hong Kong’s mini-constitution, was promulgated in this tense environment in 1990.

The Basic Law was supposed to codify the Joint Declaration’s guarantees of autonomy and the rule of law. Instead, it reflected Beijing’s tighter grip. Rather than direct elections, Hong Kong’s chief executive would be selected by a 900-member Election Committee (later expanded to 1200 members) dominated by pro-regime representatives. This has effectively turned the promise of “Hong Kong people ruling Hong Kong” into “Beijing appointees ruling Hong Kong.”

The Legislative Council would keep pro-democracy votes in the perpetual minority by balancing members elected from geographical constituencies with pro-regime members from functional constituencies.

Most importantly, the Standing Committee of China’s National People’s Congress retained final interpretation power over the Basic Law — a power it has used five times over the past 20 years.

2) Hong Kong’s 2014 Umbrella Movement failed in pressing for universal franchise.

The Basic Law stipulated “gradual and orderly progress” in the selection of the Hong Kong chief executive up to 2007 and the election of the Legislative Council up to 2008, with the ultimate aim of universal suffrage. This gave Hong Kong people the expectation that the universal franchise would begin a decade after the territory reverted to China.

That didn’t happen — in 2007, Beijing postponed any changes for another 10 years. By 2013, people in Hong Kong began to agitate for much-delayed universal suffrage, now scheduled for 2017. In August 2014, Beijing issued yet another interpretation to restrict “one person, one vote” by electing the chief executive from two or three candidates vetted by the Election Committee — renamed the Nominating Committee.

Widespread protests broke out in late August 2014 and lasted to early December. In what is dubbed the “Umbrella Movement,” protesters occupied busy roads to decry “fake universal franchise” and demand “genuine universal suffrage.” Despite being the most sustained protest in Hong Kong’s history, the movement did not achieve its goal and only temporarily blocked Beijing’s plan for vetted elections.

3) Hong Kong needs democracy if it is to preserve its freedoms.

Hong Kong citizens are divided over democracy but tend to agree on “Hong Kong’s core values” or freedoms: the rule of law, an independent judiciary, free press, impartial police, a neutral civil service and so on. The root question is whether Hong Kong can maintain its freedoms without democracy.

Optimists point out that people in Hong Kong openly commemorate the June 4 Tiananmen anniversary, practice Falun Gong exercises that are banned in China, mock Chinese President Xi Jinping (but not during his visit to Hong Kong), demonstrate against government policies, and even produce controversial films that broach the taboo subject of independence.

Pessimists contend that various freedoms have become increasingly hollowed. People who criticize Beijing may be prosecuted for civil disobedience or deprived of the means of sustenance. Critics have been demoted or fired (or even physically attacked), and some had their works censored or their contracts terminated. Despite these threats, professionals in many fields have continued to assert their freedoms.

In the aftermath of the Umbrella Movement, the Hong Kong government tightened control over universities and high schools, the hotbeds of dissent, by stacking university councils with pro-regime appointees and by introducing patriotic education requirements.

Hong Kong’s judiciary, the last pillar of freedom left standing strong, has become the latest target. Pro-regime voices have criticized judges for releasing the majority of nonviolent protesters and for convicting police officers of abuse.

Political scientists have long argued that democracy must go hand in hand with liberal institutions. Hong Kong remains the world’s only case of “freedom without democracy.” This model was viable before 1997 only because the United Kingdom was a democracy. After the handover, Hong Kong’s freedoms have become beholden to China’s one-party dictatorship.

4) The “one country, two systems” model is strained to the breaking point.

As the Hong Kong SAR turns 20, two recent developments are particularly alarming.

In January 2016, Lee Bo, a bookseller at Causeway Bay Books, was kidnapped from Hong Kong and taken across the border. The British Foreign Office reported that Lee’s “involuntary removal from Hong Kong to the mainland constituted a serious breach of the Sino-British Joint Declaration by undermining the ‘One Country, Two Systems’ principle.” Wang Zhenmin of Beijing’s Liaison Office in Hong Kong concurred that mainland law enforcers could not “do such things” under the Basic Law.

In November 2016, Beijing barred two legislators-elect from retaking their oaths. The duo had displayed a “Hong Kong is not China” flag during their initial swearing-in ceremony in October. Hong Kong Chief Executive Leung Chun-ying had asked the courts to disqualify them. As Beijing’s interpretation was announced before the conclusion of judicial proceedings, it was seen as direct interference with the judiciary’s independence.

Though some in Hong Kong see these incidents as aberrations to the otherwise successful implementation of the “one country, two systems” model, critics charge that Beijing has breached the model.

5) There may be few changes ahead under new Chief Executive Carrie Lam.

Outgoing Chief Executive Leung was particularly unpopular for his heavy-handedness — but all of Beijing’s hand-picked leaders in Hong Kong have stayed tightly in line with the Chinese leadership.

Carrie Lam, the next chief executive, will be sworn in July 1. Lam was Beijing’s choice because she served as chief secretary under Leung and proved her willingness to push through Beijing’s electoral plan. This makes her unlikely to push for universal suffrage or defend Hong Kong’s autonomy.

If Lam goes off script, Beijing holds a trump card: It can issue another interpretation of the Basic Law to rein in any moves toward Hong Kong’s autonomy.

Victoria Tin-bor Hui, associate professor in political science at the University of Notre Dame, is the author of “Hong Kong’s Umbrella Movement: The Protests and Beyond.She is a native of Hong Kong and filed this backgrounder from Hong Kong.