HONG KONG — Moves by the government of Hong Kong to bar candidates from a coming legislative election over the issue of independence from China have raised worries in this semiautonomous city about the deterioration of political freedom and the potential for renewed conflict with Beijing.

Since Saturday, Hong Kong election officers have blocked at least five candidates from the balloting, on Sept. 4, for seats on the city’s Legislative Council over questions about whether they acknowledge the city as an “inalienable part” of China.

The disqualified candidates are mostly young people who became politically active during the Umbrella Movement protests in 2014, when demonstrators shut down several thoroughfares for more than two months to push for greater choice in elections for chief executive, the top political office in the city.

The protests failed to elicit any concessions from the government. But they helped fan a “localist” movement, as it is often called, of activists seeking to strengthen Hong Kong’s identity in the face of growing cultural, linguistic and economic influence from mainland China.