Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

HONG KONG — China replaced its top official in Hong Kong Saturday following months of protests in the semi-autonomous territory.

Wang Zhimin was the most senior mainland political official stationed in Hong Kong. He was replaced as the director of the Liaison Office of the Central People's Government, embattled chief executive Carrie Lam confirmed in a statement.

The office has come under criticism in both Hong Kong and China for misjudging the growing unrest.

Luo Huining, who previously served as secretary for Communist Party in the northern Chinese province of Shanxi, will take over the role.

Lam said she was looking forward to working with Luo on promoting "the integration of Hong Kong into the overall development of the nation and the positive development of the relationship between the Mainland and Hong Kong."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Luo Huining will reportedly take charge as the mainland's official in Hong Kong after Beijing's most significant personnel change since protests erupted in the city. RAVEENDRAN / AFP - Getty Images

Around 400 people were arrested during New Year's Day demonstrations that turned violent with people throwing Molotov cocktails and vandalizing banks and shops while police responded with pepper spray and tear gas.

The protests were triggered by a now-withdrawn extradition bill in June. The movement has since morphed to include calls for greater democratic freedoms and universal suffrage amid fears of China's increased control over the territory.

Hong Kong is a former British colony that became a special administrative region of China in 1997. Unlike those living in mainland China, the territory's seven million residents can freely surf the internet and participate in public protests.

But there is widespread fear that their rights are being eroded under Beijing's rule.

In November, President Donald Trump signed into law legislation backing the protesters by requiring the State Department to certify annually that Hong Kong retains enough autonomy to justify favorable U.S. trading terms that have helped it maintain its position as a world financial center. The law also threatens sanctions for human rights violations.

The liaison office expressed "extreme anger" toward the U.S. in response, and added that Hong Kong belongs to China and "the Chinese have the ability to deal with Hong Kong affairs."

At the same time, pro-democracy forces celebrated a landslide victory by sweeping the Hong Kong district council elections. However, district councils have little power and while the territory's Beijing backed leader Carrie Lam promised to "humbly listen" to the public's opinion, Foreign Minister Wang Yi warned that no matter the results, Hong Kong will remain a part of China.

Protesters have not relented.

Jasmine Leung reported from Hong Kong, and Linda Givetash from London.