What you need to know about the anniversary of Hong Kong's return to China Sunday marks the 21st anniversary of the handover of Hong Kong to China.

BEIJING -- Sunday marks the 21st anniversary of the handover of Hong Kong from British to Chinese rule. Here is what you need to know about the history of the handover and what may be in store for this important southern Chinese territory.

The history

After the Opium Wars of the 1800s, Britain took control of Hong Kong island and the neighboring peninsula of Kowloon. Shortly afterward, the British Empire also took over an additional area known as the New Territories in a 99-year lease that would expire in 1997.

Under British rule, Hong Kong flourished, transforming from a fishing village to a coastal metropolis and global center for trade. As the lease for the New Territories drew to a close, China and Britain began a negotiation process for the handover of all three pieces of land.

Eventually it was decided that Hong Kong would be governed for the next 50 years as a special administrative region under a principle of “one country, two systems,” allowing the territory to maintain levels of autonomy similar to what it experienced under British rule.

The handover

On the night of June 30, 1997, just before midnight, the British Union Jack flag was lowered for the last time at the Hong Kong Convention and Exhibition Center in Wan Chai. Moments later, the Chinese flag and the Hong Kong SAR flag were raised as the Chinese national anthem, “March of Volunteers,” played in the background. In Beijing, fireworks went off over Tiananmen Square in celebration.

For the Chinese government, after 156 years of British rule, Hong Kong had come home.

Hong Kong today

With its own currency, system of governance and mini-Constitution known as the "basic law,” life in Hong Kong shows marked differences from life on the mainland. Rights like freedom of speech and freedom of assembly continue to be important aspects of Hong Kong’s identity.

Hong Kong remains the only place on Chinese soil to hold an annual vigil to commemorate Beijing's crackdown on the Tiananmen Square protests of 1989, talk of which is banned on the mainland.

In 2014, pro-democracy protesters took to the streets in the so-called Umbrella Movement over Beijing interference in local elections, occupying the streets of Hong Kong for 79 days.

And every year on the anniversary of the handover, protesters march in the streets to voice their opinions on a plethora of issues.

However, signs of Beijing's encroaching influence are obvious. Though Cantonese remains the most prevalent Chinese dialect, Mandarin is increasingly spoken. More than 1.5 million mainland Chinese have immigrated to Hong Kong since 1997 and now make up 20 percent of the population.

A controversial high-speed rail link is being built linking downtown Hong Kong directly with the mainland as well as a new bridge connecting Hong Kong to Macau and the mainland city of Zhuhai, which is set to open later this summer.

There are some who worry Hong Kong is becoming just another Chinese city. Where once Hong Kong was seen as one of the most developed cities in China, rapid modernization elsewhere has led to competition from nearby cities. The economy of the neighboring city of Shenzhen, home of the Chinese tech giant Tencent and consumer dronemaker DJI, has recently exploded, surpassing Hong Kong in both population and economic growth.

What’s next?

In recent years, Hong Kong residents have become increasingly polarized: One side supports closer ties with Beijing while the other is pushing for democracy and supports further autonomy.

With the approach of 2047, when Beijing’s promised 50 years of semi-autonomy for Hong Kong will end, nerves are beginning to rattle, especially among the younger generation. A survey conducted by Chinese University of Hong Kong found that more than 45 percent of respondents between 18 and 35 years old want to emigrate out of Hong Kong, citing political tensions as the main reason. Until then Hong Kong’s future will continue to be the subject of heated debate.