HONG KONG — The Hong Kong government used a colonial-era public security ordinance to ban a small pro-independence political party on Monday, a move that rights advocates said would threaten free expression and association in the city.

The Hong Kong National Party has just a handful of members and no elected representatives, but it attracted intense government scrutiny for its call to make Hong Kong, a former British colony that rejoined China in 1997, an independent state.

The decision to ban the party was announced in a published notice in the Hong Kong government gazette. John Lee, the secretary for security, said in July that the authorities were considering outlawing the group, and had solicited its response.

“I cannot ignore the fact that the Hong Kong National Party has repeatedly advocated that it will use all methods, including the use of force, and also encouraging its supporters to use force,” Mr. Lee said Monday. He said the party had promoted hatred and discrimination toward mainland Chinese in Hong Kong.