Mrs. Lam later suspended the bill but stopped short of formally withdrawing it, infuriating the protesters and drawing them out in greater numbers. In the weeks since, she has refused to make further concessions, including the call for an independent investigation of the police’s handling of the protests.

“They kind of try to rule Hong Kong the way they rule China. That doesn’t really work in an open society,” said Michael C. Davis, a global fellow at the Wilson Center, a think tank in Washington. “In Hong Kong, when you push people, when you repress them, when you ignore them — they push back.”

But the protesters’ challenge to Beijing has also backed the party into a corner. In recent days, protesters have grown more defiant, lighting fires, hurling bricks and gasoline bombs and defacing symbols of Chinese rule.

The party is determined to not look weak in the face of the tumult, which has quickly become the biggest public resistance to the rule of Mr. Xi since he took power in 2012. The Chinese government has made veiled threats of military intervention and accused protesters of plotting a “color revolution” with help from the United States, referring to anti-Communist uprisings it says are orchestrated by the West.

“It is now a ‘life-or-death’ fight for the very future of Hong Kong,” Wang Zhimin, the head of the central government’s office in the city, warned members of Hong Kong’s establishment last week. “There is no room for retreat.”