HONG KONG—In a highly symbolic act, mainland Chinese soldiers in black shorts and olive drab T-shirts jogged out of a barracks here to clear streets of bricks, metal bars and other debris left by demonstrators after one of the most violent weeks in five months of pro-democracy protests.

China has garrisoned People’s Liberation Army troops in Hong Kong since the 1997 handover of the former British colony. The soldiers here mostly keep to their barracks and are broadly meant to operate in the city only if the local government...