The vandalism may have alienated many moderates who had previously backed the movement. But I saw large crowds outside the building, who supported the aims of the protesters. They were not firebrands, but students, social workers and physiotherapists who felt there was nothing left for them to lose.

That sense of impotence has been stoked by the failure of the Umbrella Movement in 2014, which sought freer elections but won no concessions after peacefully occupying key thoroughfares for more than two months. One young college student said bitterly: “The Umbrella movement was a big joke. Two months. Nothing gained. So that’s why Hong Kong people are gradually thinking we need to level up our actions.” As news emerged that the police would move in to the building, a young woman protected only by a paper face mask insisted she would stay on to bear witness. “We are scared,” she said. “But we’re more scared that we’ll lose our freedom.”

The protesters left around midnight, and police used tear gas to clear the streets, which had been occupied by some of the tens of thousands who had marched over the course of the day. Many questioned the role of the police: They had been in the Legco building but had suddenly disappeared, allowing protesters the chance to break in. Many suspected the retreat was a deliberate strategy to provide the government with justification to crack down on a “violent” movement. At a surreal 4 a.m. news conference, Ms. Lam, flanked by her unpopular police chief and secretary for security, did nothing to quell the suspicion.

Throughout this hot summer of civil disobedience, Hong Kong’s leaders have been astonishingly tone-deaf. The image of Ms. Lam toasting with champagne glasses at an official 22nd anniversary celebration of Hong Kong’s return to China enraged protesters. She watched the official flag-raising ceremony — accompanied by two hated former chief executives — on a closed circuit television inside a convention center that had been surrounded by rings of security. Outside, protesters held their own ceremony, raising to half-staff a flag depicting a blackened, dying bauhinia.

No one knows what will come next. The protest movement could subside or split into moderate and radical camps. Or the escalating cycles of violence, followed by tear gas, could become commonplace. Much now depends on whether the government will respond to the voices on the street with action. The turmoil is already damaging Hong Kong’s institutions, its international reputation and its desirability as a home. That fear was voiced on another banner, suspended on a wall on the other side of the legislative building, which read, “If we burn, you burn with us.”

Louisa Lim (@limlouisa) is a senior lecturer at the Center for Advancing Journalism at the University of Melbourne, Australia, and the author of “The People’s Republic of Amnesia: Tiananmen Revisited.”