People’s Liberation Army troops stand in formation during a visit by Chinese President Xi Jinping in Hong Kong on Friday. (Anthony Kwan/Bloomberg News)

China staged the territory’s largest military parade ever Friday for the benefit of visiting President Xi Jinping — and as a none-too-subtle reminder to its residents of who’s their boss.

China is marking the 20th anniversary of Hong Kong’s handover from British rule with three days of official celebrations. But many people here are not inclined to join in the fun, believing that a promise to grant the territory greater democracy has been broken and that the values that Hong Kongers hold dear have been steadily eroded in recent years. 

In 2014, hundreds of thousands of people took to the streets for several weeks to demand greater democracy in what became known as the Umbrella Revolution. When those demands were rejected out of hand, some young people began to say the unsayable, arguing that Hong Kong would be better off independent of China.

But Friday’s military parade, and a subsequent speech by Xi, served to underline China’s main argument — that the people of Hong Kong really have no choice but to accept the reality of life as part of a powerful nation under Communist Party rule.

“Greetings comrades,” a stony-faced Xi said as he was driven in an open-top jeep past more than 3,000 People’s Liberation Army troops who are garrisoned here, massed in 20 divisions. “Comrades, you have worked hard.”

“Greetings, Chairman!” the troops bellowed back over and over, saluting Xi in his role as chairman of the country’s military commission — their supreme military commander. “Serve the people!”

Behind the troops, the red flags of China flew in the breeze, while tanks, helicopters, armored personnel carriers and air-defense missiles stood in massed array. 

On Chinese state television, anchors and experts gushed over the impressive display of China’s sovereignty over Hong Kong and a garrison that has traditionally kept a lower public profile.

But for the people of Hong Kong, the event was also meant to show China’s “resolute power and confidence to combat the separatist movement,” said Edmund Cheng, an assistant professor at Hong Kong Baptist University. The message, he said, is simple: “Sovereignty is absolute, and the national security threat must and will be handled properly and decisively.”

Later, Xi was in a more rhetorical mood as he delivered an address to the territory’s elite, recalling his emotions 20 years before when Hong Kong returned to China “like a long-separated child coming back to the warm embrace of his mother.”

He told Hong Kongers to believe in themselves as part of a “time-honored” Chinese civilization that under Communist Party leadership has again taken its place as a leading global nation, to believe in Hong Kong with its “free and open economy,” and to believe in the motherland, “which will always give strong backing to Hong Kong.”

“China has made great strides forward: first managing to stand on its own two feet, to becoming prosperous and strong,” he said, calling it the world’s second-largest economy and the world’s biggest contributor to economic development. “When our country does well, Hong Kong will do even better.”

Under the terms of the handover from British rule, China promised to maintain Hong Kong’s values and way of life for 50 years under a model known as “One Country, Two Systems.” 

The handover July 1, 1997, came eight years after the Communist Party violently crushed pro-democracy protests in Beijing’s Tiananmen Square, and the model was supposed to assuage Hong Kongers’ doubts and win their loyalty. It was also seen as a model that might one day attract the island of Taiwan back into the national fold. 

And for the first decade, it seemed to work: Beijing took a hands-off approach, China’s economy boomed and more people here began to describe themselves as citizens of China first and Hong Kong second.

In the past decade, though, the opposite has happened.

Beijing tried to push through the National Security Law, resulting in half a million people taking to the streets to counter a threat to their cherished freedom of speech; it tried to ram through a program of “patriotic education” that served only to politicize high school students; and it reneged on a promise to deliver greater democracy. 

And as Hong Kongers resisted, China responded by getting ever tougher. 

By 2014, the promise of a “high degree of autonomy” gave way to the idea that China has “comprehensive jurisdiction” over Hong Kong. One country, officials began to explain, took precedence over two systems.

Anson Chan, who served as the territory’s top bureaucrat during British and Chinese rule, said that “the impression that Beijing increasingly gives to the people of Hong Kong is that what little autonomy we have is for them to give and take away at will.”

At the same time, the economic benefits from reunification seemed to flow toward tycoons rather than ordinary people, while a flood of Chinese immigrants and tourists made many locals feel overwhelmed. 

Suddenly, more and more Hong Kongers discovered an identity of their own.

Two years after the Umbrella Revolution petered out, the previously taboo idea of an independent Hong Kong was supported by nearly 1 in 6 Hong Kongers, according to a poll by the Chinese University of Hong Kong.

Support for independence has since ebbed, but the Chinese government’s hard-line response continues to alienate many people here. A recent poll by Hong Kong University found just 3 percent of 18-to-29-year-olds describe themselves as broadly Chinese, down from nearly 32 percent two decades ago.

Meanwhile, the idea that Hong Kong could serve as a model for Taiwan’s eventual “reunification” seems far-fetched, and deeply unattractive to most people in Taiwan.

In a statement to mark the anniversary, the U.S. State Department expressed concerns about “infringements on civil liberties in Hong Kong, including intrusions on press freedoms,” and called on China to respect Hong Kong’s autonomy as set out in the “legally binding Sino-British Joint Declaration” of 1984.

That, and a similar British statement, prompted a furious response from Beijing — a response that served only to underline the hardening of China’s stance.

“Now that Hong Kong has returned to the motherland for 20 years, the ‘Sino-British Joint Declaration’ as a historical document no longer has any realistic meaning,” foreign ministry spokesman Lu Kang said. “It also does not have any binding power on how the Chinese central government administers Hong Kong.”

But Michael Davis, a law professor at Hong Kong University, said China had promised under the agreement to maintain Hong Kong’s autonomy for 50 years after the handover.

That obligation, he said, “cannot possibly be fulfilled until the 50 years pass,” adding that China’s claim “clearly ignores the Chinese government’s international legal obligations under a binding treaty duly registered with the United Nations.”

Hong Konger Andy Chan Ho-tin said he had never taken an interest in politics before the Umbrella Revolution. As a business and engineering student, he saw a traditional career path ahead of him. But on the streets, he found a new identity and a new belief.

“I realized we were not asking for democracy from the Hong Kong government. I realized we were asking for it from Beijing,” he said. “I realized the Hong Kong government is just a puppet. We need our own government. Then we can have democracy.”

Chan later gave up his career as an engineer to form the small pro-independence Hong Kong National Party, but he was not allowed to register it nor to stand in elections. An application to stage a small rally Friday night was refused by the police, who accused him of violating the territory’s mini-constitution, or Basic Law. The venue where it was supposed to take place was fenced off and guarded by police, and Chan was warned that he would be arrested if he tried to go ahead.

“We have to tell the world that Hong Kong is China’s colony,” he said. “But I can’t run an election, register a party or even open a personal bank account. They make it sound like I am a terrorist.”

Luna Lin contributed to this report.