China condemned Hong Kong’s pro-democracy opposition for holding a primary contest ahead of key elections, saying the exercise was supported by "foreign forces” and may violate the city’s new national security law.

The central government’s Liaison Office in Hong Kong said in a statement late Monday the primaries were "illegal.” That echoes previous statements from top Hong Kong government officials that the opposition primaries could fall afoul of the sweeping new security measures imposed by Beijing in late June.

"With the support of foreign forces, some opposition groups and their leaders have deliberately devised plans to hold these so-called ‘primaries,’ which have seriously challenged the current electoral system, and seriously damaged the fairness and justice of the Legislative Council elections,” a spokesperson, who was not named, for the Liaison Office said. "They also seriously damaged the legitimate rights and interests of other potential candidates.”