China will "perfect" the way the leader of Hong Kong will be appointed and replaced, refusing to tolerate separatism or threats to national security there, according to a senior Chinese official.

Key points: The closed-door meeting was attended by 370 top officials

The closed-door meeting was attended by 370 top officials The meeting was told that "one country" is the foundation for "two systems"

The meeting was told that "one country" is the foundation for "two systems" Young people and civil servants must improve their "patriotic spirit", the meeting heard

The past five months of anti-government protests in the former British colony represents the biggest popular challenge to President Xi Jinping's Government since he took over the leadership in late 2012.

On Thursday, the party vowed to ensure Hong Kong's stability, after a closed-door, four-day meeting of the ruling Communist Party's senior leaders in Beijing, signalling its importance.

What started as opposition to a now-withdrawn extradition bill has grown into a pro-democracy movement against what is viewed as Beijing's tightening grip on the Asian financial hub.

Chinese President Xi Jinping was among 370 senior officials at the meeting. ( AP: Xinhua/Ju Peng )

Protesters say it is undermining the "one country, two systems" formula promised when Hong Kong was handed back to China in 1997, guaranteeing freedoms not found in mainland China.

Speaking to reporters on the outcomes of the meeting of the top leadership, parliament official Shen Chunyao said Hong Kong was "of course" an important topic of discussion.

The meeting — which gathers together some 370 officials, from Mr Xi on down — stressed that "one country" is the foundation for "two systems", and the party will support the governments of the Special Administrative Regions, including Macau, to strengthen their law enforcement efforts, said Mr Shen.

He is the head of the Parliament's Basic Law Committee. The Basic Law is Hong Kong's mini-constitution that governs its relations with Beijing.

The five-month-long anti-government protests show no signs of slowing down any time soon. ( AP: Kin Cheung )

Mr Shen said, without giving details, that the officials decided to "perfect" the system for appointing and replacing the leaders of Hong Kong and Macau and other senior officials.

Hong Kong's four post-handover chief executives have all been chosen by a small election committee stacked with pro-Beijing loyalists. The Basic Law states the "ultimate aim" is selection of the chief executive by "universal suffrage upon nomination by a broadly representative nominating committee".

China has repeatedly said that it supports Hong Kong Chief Executive Carrie Lam and her Government.

Hong Kong and Macau society, especially civil servants and young people, must improve their "patriotic spirit" and knowledge of China's history and culture, Mr Shen added.

"In short, we will further improve the central Government's system of exercising full administrative power over the Special Administrative Regions in accordance with the constitution and the Basic Law," he said.

"[The party will] firmly safeguard national sovereignty, security, and development interests, safeguard the long-term prosperity and stability of Hong Kong and Macau, and will not tolerate any challenges to the bottom line of 'one country, two systems'," Mr Shen said.

"[It] will not tolerate any act of splitting the country or endangering national security, and resolutely prevent and contain external forces from interfering in Hong Kong and Macau affairs and carrying out separatist, subversive, infiltration or destructive activities."

He gave no details of any specific policy steps Beijing might take.

China denies meddling in Hong Kong and has accused foreign governments, including the United States and Britain, of stirring up trouble.

China has also quietly more than doubled its deployment of mainland security forces in Hong Kong, according to foreign envoys and security analysts, in a dramatic move by Beijing to prepare for a potential worsening of the unrest.

Reuters