HONG KONG (Reuters) - The European Union on Tuesday criticized the Hong Kong government’s decision to bar a 21-year-old activist from standing for election, saying it contradicted an international human rights treaty and risked hurting the city’s reputation.

FILE PHOTO: Pro-democracy activist Agnes Chow, 21, attends a rally after she was banned from running in a by-election, in Hong Kong, China January 28, 2018. REUTERS/Bobby Yip/File Photo

Agnes Chow, a close ally of student protest leader Joshua Wong, was officially notified over the weekend that she could not stand in a March legislature by-election because of her political party’s platform.

The government’s decision “risks diminishing Hong Kong’s international reputation as a free and open society,” said Maja Kocijancic, the EU spokeswoman for foreign affairs and security policy.

“The protection of civil and political rights in Hong Kong is an essential part of the implementation of the ‘One country, two systems’ principle, which the EU supports,” Kocijancic said in a statement.

“Barring candidates from standing for election because of their political beliefs is in contradiction with the right under the International Covenant on Civil and Political Rights... to stand for election without unreasonable restrictions.”

The treaty has been incorporated into the laws of Hong Kong, governed under a “one country, two systems” formula since its return from British rule in 1997, allowing freedoms not enjoyed in mainland China that include an independent judiciary but not a fully democratic vote.

In Beijing, Chinese foreign ministry spokeswoman Hua Chunying said Hong Kong affairs were purely an internal matter for China.

“China resolutely opposes any foreign government, organisation or individual interfering in Hong Kong’s affairs,” she told a daily news briefing.

The United States firmly supports Hong Kong’s respect for human rights and fundamental freedoms, said a spokeswoman of its consulate general in the territory.

“The United States supports freedom of expression and believes that societies are best served when diverse political views can be expressed.”

News of the disqualification sparked a protest by at least 2,000 people in the Asian financial hub, and condemnation from a group of lawyers, as being “unreasonable, unlawful and unconstitutional”.

International groups, such as Human Rights Watch and British non-government body Hong Kong Watch, also expressed concern.

Hong Kong leader Carrie Lam on Tuesday denied that she or Beijing had pressured her subordinates to bar Chow, however.

“This was done according to the law,” she said. “People are not, as some foreign organisations alleged, stripped of their right to stand for election because of their political affiliation.”

Wong and Chow’s political party, Demosisto, formed after widespread street protests in 2014 that demanded full democracy, advocated the right to “self-determination”.

In urging “self-determination,” Demosisto said it was not advocating Hong Kong’s independence from China but instead demanding a referendum on its future after 2047, the year when the territory’s capitalist system and “way of life” cease to be fully guaranteed by its mini-constitution, the Basic Law.

But Hong Kong and Chinese authorities have repeatedly condemned independence and self determination as deviations from the “one country, two systems” principle that cross Beijing’s limits.