Hong Kong (CNN) In the largest display of military might since Hong Kong was handed to China 20 years ago, Chinese President Xi Jinping inspected the Hong Kong garrison of the People's Liberation Army Friday.

The PLA is normally barely visible in Hong Kong , where its presence is still a sensitive subject, but it was out in force for Xi, with 20 squadrons taking part, including land, navy and air forces.

Xi, standing in an open-top military vehicle, drove past 3,000 troops lined up at the Shek Kong base in the northern New Territories, near the Chinese border. Surrounded on all sides by tree covered mountains and under a baking sun, Xi greeted the rows of troops in turn.

"Hello hard working comrades," Xi said from open top car reminiscent of the type he rode in during a major military parade in Beijing last year.

On July 1, 2017, Hong Kong marks 20 years of Chinese rule at a ceremony overseen by Xi.

On July 1, 2017, Hong Kong marks 20 years of Chinese rule at a ceremony overseen by Xi.

Security at the event was tight, with reporters told not to bring pens, phone batteries, or umbrellas.

Security at the event was tight, with reporters told not to bring pens, phone batteries, or umbrellas.

A small crowd of onlookers were specially invited to the parade alongside Xi.

A small crowd of onlookers were specially invited to the parade alongside Xi.

According to a recent article in a highly respected Communist Party journal, the Hong Kong garrison has transformed from a "symbolic presence to a show of force."

According to a recent article in a highly respected Communist Party journal, the Hong Kong garrison has transformed from a "symbolic presence to a show of force."

Around 6,000 troops are based in the city, with their headquarters in Admiralty, next to the Hong Kong government offices.

Around 6,000 troops are based in the city, with their headquarters in Admiralty, next to the Hong Kong government offices.

The PLA normally keeps a low profile in Hong Kong, where its presence is still a sensitive subject.

The PLA normally keeps a low profile in Hong Kong, where its presence is still a sensitive subject.

A total of 20 squadrons paraded in front of Xi, including land, sea, and air forces.

A total of 20 squadrons paraded in front of Xi, including land, sea, and air forces.

The parade was the largest since Hong Kong's handover from British to Chinese rule in 1997.

The parade was the largest since Hong Kong's handover from British to Chinese rule in 1997.

Chinese President Xi Jinping inspects the Hong Kong garrison of the People's Liberation Army (PLA) at their Shek Kong base in Hong Kong, on Friday, June 30, 2017.

Chinese President Xi Jinping inspects the Hong Kong garrison of the People's Liberation Army (PLA) at their Shek Kong base in Hong Kong, on Friday, June 30, 2017.

Xi arrived in Hong Kong Thursday to mark two decades of Chinese rule in the former British territory. On his arrival, he encouraged Hong Kongers to "look forward to the future."

Xi's visit comes at a tense time for Hong Kong, amid fears the city's autonomy from China, promised under a framework known as 'one country, two system' is being eroded.

Chris Patten, Hong Kong's last British colonial governor, said that China had been pressuring Hong Kong "in all sort of ways."

"In the last few years, particularly after Xi Jinping took over, and parallel to the crackdown on dissidents in China, there has been increased pressure on Hong Kong's windpipe," Patten told CNN's Christiane Amanpour.

"You see this in attacks on the judiciary and the rule of law, interference in court cases, you see it in the atmosphere of hostility toward the independence of universities and the media."

Hong Kong's People's Liberation Army soldiers parade on June 30, 2017.

While in Hong Kong, Xi will spend little time near the public. Much of Wan Chai, a bustling business district in the city center where Xi is staying, is on partial lockdown, with 300, 2-ton barricades erected on roads around the Hong Kong Convention and Exhibition Center. The venue will host many events marking the city's handover from the UK to China.

The military parade was watched by crowds specially bused in, most of them members of civic organizations and cadet and scout troops.

Security was tight, with reporters instructed not to bring pens or phone chargers, and all umbrellas were banned, though PLA approved ones were handed out past security.

Chinese President Xi Jinping begins a review of troops from a car during a military parade in Hong Kong on June 30, 2017.

China has also dispatched its only aircraft carrier, the Liaoning, to Hong Kong as part of handover celebrations.

According to the Communist Party journal Qiushi, the Hong Kong PLA garrison has "transformed from a symbolic presence to a show of force, from image building to combat capability development."

Ely Ratner, a China expert at the US-based Council on Foreign Relations, said the military's growing presence in the city was part of the government's efforts "to turn Hong Kong into just another Chinese city."

Members of Chinese People's Liberation Army based at the Hong Kong garrison on June 30, 2017.

Gala dinner

Xi returned to central Hong Kong following his brief inspection. On Friday night he will oversee an official dinner and grand gala celebration to mark the city's 20th year of Chinese rule on Saturday.

Chinese President Xi Jinping (on screen) reviews troops from a car during a military parade in Hong Kong on June 30, 2017.

Protests by pro-Hong Kong independence activists are expected at the same time across the harbor. Organizers have called for their supporters to gather and "crush Chinese colonialism."

Wu Chi-wai, the chairman of the Hong Kong Democratic Party, told CNN he would present Xi a letter at the dinner asking him to restart political reform in the city.

A previous effort in 2014 stalled when Beijing would only countenance a hardline stance where it pre-selected candidates for the city's top job prior to the public voting on them.

The letter will also discuss the fate of Liu Xiaobo, the jailed Chinese novel peace price laureate who was released on medical parole this week.

Wu said Liu had been denied freedom of movement and the freedom to choose his own medical treatment, restrictions which went against Hong Kong's values.

Xi's first day in Hong Kong was relatively peaceful as heavy security prevented anyone who may have wanted to disrupt proceedings from getting too close to the president.

Rallies held around town were mostly patriotic ones welcoming the Chinese leader with songs and flags. Huge banners were strung over the highway Xi took to the city, welcoming him for his "official inspection" and celebrating "20 years of Hong Kong's return to the motherland."

Protesters released

Pro-China supporters gather along a road during Xi's visit on June 29, 2017.

Hong Kong protest leader Joshua Wong and other pro-democracy activists were released from custody Friday, after being arrested for storming a key ceremonial site as the city hosts the Chinese President.

Wong and 25 other protesters occupied Golden Bauhinia Square on Wednesday evening, where President Xi Jinping is expected to attend an official flag raising ceremony this weekend.

Police said the protesters were charged with public nuisances offenses and were placed on bail until late September.

Wong, 20, was a leader of the Umbrella Movement that spawned massive streets protests, which paralyzed much of the city in 2014.

Addressing supporters later on Friday near government offices in Admiralty, Wong said that Hong Kong's situation had not improved in the last 20 years since handover.

"I want true universal suffrage! I am a Hong Konger! Democracy now," Wong and other protest leaders chanted to a small crowd of supporters than was outnumbered by police.

From left to right: Hong Kong democracy activists Joshua Wong, Leung Kwok-hung aka "Long Hair" and Nathan Law speak at a news conference on Friday, June 30. All three were arrested during a protest Wednesday.

Xi will leave the city on Saturday after attending a flag-raising ceremony to mark the 20 years since China assumed sovereignty over Hong Kong.

Attention will then turn to the annual July 1 pro-democracy march, which organizers expect to attract tens of thousands of people.