Updated

Crowds of protesters who filled Hong Kong's streets with demands for more democracy thinned dramatically Tuesday after student leaders and the government agreed to hold talks in the increasingly frustrated city.

Just a couple of days after tens of thousands of demonstrators thronged the city's streets, only a few hundred protesters were scattered across the three main protest areas for much of the day. But the six-lane highway that cuts through the heart of Hong Kong's business district remained blocked by demonstrators, once again snarling traffic and angering many commuters.

One young protester sleepily brushed his teeth as rush hour began, while a sleeping demonstrator leaned back in a nylon chair nearby, his mouth open and his eyeglasses askew.

Despite the dwindling numbers of activists on the streets, protest leaders insisted the movement was far from defeated, and vowed to walk away from negotiations if the police used force to clear away the remaining demonstrators.

Michael Leung, 14, wearing his school uniform and doing homework on the highway, said he had come to the protest zone on three days after school.

"You see now the number of people is decreasing because there has been no big action from the government and the police," he said. "But I think if the government or police want to clear this area, then the people will come out again."

At the territory's government headquarters, which had been blocked by protesters for a week, only a half dozen or so student protesters remained at the barricades. Eight policemen stood nearby, chatting among themselves.

On Tuesday night, a dozen policemen ringed a small group of pro-Beijing demonstrators as they marched near the protesters.

"It is true democracy we're looking for!" one of the demonstrators cried into portable loudspeaker, as the group shouted her down.

Late Monday, Lau Kong-wah, the territory's undersecretary of constitutional affairs, said the government and students had agreed on terms for talks, saying they would enter discussions on an equal footing. Lester Shum, a leader of the Hong Kong Federation of Students, confirmed the agreement, but said they had not discussed or reached a consensus on the agenda. A date for the meeting had not been set.

The dueling questions now are how long the demonstrators are willing to continue their protests - and how long until the government removes them.

"We are safe (from a crackdown) for the moment," said Joseph Cheng, a specialist in Chinese politics at the City University of Hong Kong who has deep ties to the city's pro-democracy movement. "Now that there are negotiations going on - or at least negotiations to discuss negotiations - we expect that the police will not clear the protesters for a few days."

But with the authorities unlikely to agree to the protesters' immediate demands, including the resignation of Hong Kong Chief Executive Leung Chun-ying, any talks could quickly collapse.

"The real test is what happens when the negotiations break down," said Cheng.

Like many protest leaders, Cheng suspects the government is purposefully slowing discussions to drive a wedge between the activists and residents increasingly anxious for the protests to end.

People "are now beginning to say: `Hey, we want to make a living. You are disturbing my daily life,'" he said.

The protesters are demanding a wider say in the inaugural 2017 elections for Hong Kong's top official, known as the chief executive, than China's central government is willing to give them. Beijing, which controls Hong Kong but allows far more liberty here than on the mainland, insists that all candidates be screened by a committee of mostly pro-China tycoons and other elites, raising fears of a tightening grip by Communist leaders.

A police spokesman warned Tuesday that "the chance of further confrontations is increasing" in the city's Mong Kok district, where mobs tried to drive away protesters over the weekend. The protesters "have occupied the road illegally for many days," said police spokesman Steve Hui, adding that authorities would "take action at the appropriate time."

Earlier crackdowns, though, have backfired on the government. When police fired tear gas and pepper spray on unarmed demonstrators on Sept. 28, it caused an upsurge in support for the protesters and brought tens of thousands of Hong Kong residents into the streets.

On Monday, Leung, the city's chief executive, said in a TV address that the government would seek "a sincere dialogue on political reform."

At the same time, he urged the end to the blockade of the streets and issued veiled warnings that the authorities would eventually need to "restore social order."

"I hope that the protesters gathering on the roads, especially students and young people, could think this over: While fighting for a better future and democracy for Hong Kong by way of civil disobedience, should you also consider the prolonged disruption caused to the general public?" he said.

Primary schools in districts affected by the protests reopened Tuesday, a day after high school classes resumed. Civil servants returned to work after protesters cleared the area outside the city government headquarters, a focal point of the demonstrations that began Sept. 26. But the city's legislature, located in the same complex, postponed two meetings on Tuesday.