BANGKOK, Oct. 16 (CNA) - From shops, offices and schools they spilt onto a Bangkok street in their tens of thousands, voicing shock and anger and defiance.

Thailand's government had announced emergency measures to ban gatherings of five or more people to try to end three months of protests. The response was one of the biggest demonstrations so far, in the heart of the capital.

About 10,000 Thai protesters gathered on Thursday (Oct 15), chanting "Prayut get out!" and "Free our friends!" as they confronted police at Ratchaprasong, a busy junction in central Bangkok.

"You push us into the corner like a dog," one of the few prominent activist leaders not in custody, Panupong "Mike" Jadnok, told the crowd.

"And with our backs against the wall, we'll bite back with nothing to lose," he said.

As night fell, protesters waved their lit-up mobile phones in the air.

Thousands sat on plastic sheets on the road snacking on street food while scores more watched from overhead walkways. Many said they would return on Friday evening.

"I'm not afraid. Emergency or not, I have no freedom," said 26-year-old illustrator Thanatpohn Dejkunchorn, who left work early to attend the protest with friends. "I want freedom to exist in this country. I want it to be free from this vicious cycle."

Protests have built since mid-July in the biggest challenge in years to the political establishment - seeking the removal of Prime Minister Prayut Chan-o-cha, a former military leader, and to curb the powers of King Maha Vajiralongkorn.

"We have to create understanding with the protesters," government spokesman Anucha Burapachaisri told Reuters, complaining that protest leaders were not giving protesters "complete information".

Police said they would arrest all protesters, though they did not explain how they would charge tens of thousands of people.

The Royal Palace has declined to comment on the protesters or their demands.

Until Wednesday, the government had largely allowed demonstrations to happen, while making no sign of meeting protesters' demands.

But that changed after an incident in which protesters jeered Queen Suthida's motorcade as she and the king were paying a rare visit from Europe, where they spend most of their time.

The government cited the risks to national security and the economy from protests, as well as the danger of spreading coronavirus, as reasons for imposing emergency measures.

The government then launched a crackdown early on Thursday, sweeping away a camp set up outside Prayut's office and arresting three protest leaders - among around 40 arrests in the past week.

Later, student leaders took to social media to urge supporters to take to the streets.

Among those who turned out were high school students, who covered the ID tags on their uniforms with duct tape.