“We’ve never seen anything like this, never imagined it,” said Kevin Chan, a 48-year-old factory manager who joined many thousands of people gathered at night on the road near the government offices. “The government must awaken that this is the Hong Kong people,” he said, gesturing to the crowd, mostly people in their 20s. “These are not their enemies. These are the people.”

The escalation of the protests, and the unusually strong response by the police, pointed to the possibility of a long confrontation between a city government pressured by the Chinese Communist Party’s demands for top-down control and residents’ demands for a city leadership chosen by democratic means.

The protest at the government offices was started by students demanding such electoral changes. Beijing last month proposed that the public would be able to vote for the city’s chief executive, beginning in 2017. But a committee dominated by people loyal to the Chinese government would be able to screen out candidates who did not have Beijing’s backing.

“What is going on now, in addition to any immediate public order issues, is a battle for the hearts and minds of the Hong Kong public,” said Michael C. Davis, a professor of law at the University of Hong Kong, who has closely followed the debate over election reform. “Beijing may be indifferent to protest or at least not inclined to give in. The Hong Kong government needs public support.”

The police issued a warning Sunday evening saying that a lockdown had been imposed on several downtown areas, including the vicinity of the central government’s offices, and declared any assembly near the offices unlawful. Officials had earlier in the weekend reported 78 arrests.

But late into the night and on Monday morning, many thousands of residents remained on the streets, denouncing the police crackdown and staging sit-ins in several neighborhoods outside the original protest area. In the neon-lit shopping districts of Causeway Bay and Mong Kok, which were packed with shoppers, hundreds of protesters blocked traffic.