A pro-independence political group that sought to split Hong Kong from mainland China has been banned for being a "threat to national security and public safety," Hong Kong's security chief said Monday.

Secretary for Security John Lee said that with immediate effect the Hong Kong National Party is prohibited from operation, two months after police recommended that the group be banned.

"The Hong Kong National Party has a very clear agenda to achieve its goal that Hong Kong be made an independent republic," Lee told reporters.

"Over the two years (since the party's establishment), it has made plans and it has executed action to implement the plans. The Hong Kong National Party also spreads hatred and discrimination against (mainland Chinese) in Hong Kong," he said.

Lee said the party's advocating the use of "all methods" including "armed revolution" to achieve its goals of independence was more than just a slogan and went beyond the scope of freedom of speech.

Actions taken by the group, Lee said, included the establishment of a company, standing in the Legislative Council election, advocacy targeting young people, seeking overseas funding support, and publishing and making speeches advocating independence.

"In the interest of national security, public safety, public order and the protection of rights and freedom of others, I make the decision to prohibit its operation or continued operation," he said.

Lee added that the party is now an unlawful organization, which means it cannot legally organize activities, raise funds, or invite members to join, with offenders facing up to three years in prison.

The group has 30 days to appeal the ban.

The government used a colonial-era public security law intended to target triad gangs to ban the party, marking the first time for the law to be used to silence a group for its political agenda.

In a meeting in Beijing last month, Chinese Vice President Han Zheng mentioned the party by name and told Lee to "deal with it according to law."

Party convener Andy Chan, who recently said he expected the party to be banned, has yet to comment on the decision or if he will make an appeal.

Chan established the party in 2016 with the aim to "build a free and independent Hong Kong Republic" and "expel Chinese colonists" from Hong Kong, according to the party's manifesto on its website.

He was banned from standing in the legislative election the same year for failing to sign a declaration pledging allegiance to Hong Kong.

The British government has expressed concern over the prohibition order, saying in a statement that Hong Kong's high degree of autonomy and its rights and freedoms should be "fully respected."

Hong Kong, a former British colony that returned to Chinese rule in 1997, exercises autonomy over domestic affairs except national security and diplomacy, which remain under China's jurisdiction.

While Hong Kong enjoys freedom of speech and assembly, Beijing has reacted strongly toward independence advocacy and those who facilitate discussion on the topics.

The Foreign Correspondents' Club in Hong Kong was severely criticized for hosting Chan in a luncheon speech last month.

Pro-Beijing political parties said they welcomed the ban.

"Although delayed, it should send a strong message to deter independence advocacy," said legislator Starry Lee of the Democratic Alliance for the Betterment and Progress of Hong Kong.

The pro-democracy Civic Party said it condemned the government for infringing upon Hong Kong people's freedom of political preference, adding that the move sets a terrible precedent.

The Hong Kong and Macao Affairs Office of the State Council, overseeing Hong Kong affairs, said it "resolutely supports" the ban.

But the ban has drawn concerns from foreign governments over Hong Kong authorities' commitment in upholding the rights and freedoms in the semiautonomous territory.

A United States consulate spokesman said in a statement late Monday that the Hong Kong government's decision to ban a political party is "inconsistent with freedom of expression and association. These were core values the U.S. shared with Hong Kong and must be vigorously protected," local media reported.

Britain's foreign ministry said it is "concerned by the decision" to prohibit the party.

"The U.K. does not support Hong Kong independence, but Hong Kong's high degree of autonomy and its rights and freedoms are central to its way of life, and it is important they are fully respected," the FCO statement reads.

The European Union also said the ban "limits the freedom of expression and association, as well as political activity in Hong Kong, and risks having a wider negative impact."

The string of comments from foreign countries riled Beijing even more. The Commissioner of Foreign Ministry in Hong Kong said in response that it supports the ban against the separatist party, while urging relevant foreign countries to "respect China's sovereignty and territorial integrity, stop using freedoms of speech and of assembly as excuses to interfere in Hong Kong's and China's internal affairs.

"Honor promises of supporting 'one country, two systems' and opposing 'Hong Kong independence' with genuine action and stop sending wrong messages to pro-independence forces," the commissioner office said.

The Hong Kong government In a late reply reiterated its commitment to upholding free speech and freedom of assembly, but added that such freedoms have restrictions legally installed, local media TVB reported.