Thai Prime Minister Prayuth Chan-ocha said on Friday he was not quitting after tens of thousands of anti-government protesters defied a ban on demonstrations and he warned them not to persist.
The ban on gatherings of more than five people was imposed early on Thursday after nearly three months of protests that have called for a reduction in the powers of King Maha Vajiralongkorn's monarchy as well as the removal of Prayuth.
Protesters defied the ban and staged one of the biggest demonstrations in Bangkok on Thursday evening.
"I'm not quitting," Prayuth told reporters after an emergency cabinet meeting.
"The government must use the emergency decree. We have to proceed because the situation became violent... It is being used for 30 days, or less if the situation eases."
He warned people not to violate the emergency measures, saying: "Just wait and see... If you do wrong, we will use the law."
Protesters seek the removal of Prayuth, who first took power in a 2014 coup, saying that he engineered last year's election to keep hold of power. He says the election was fair.
Protesters also want a new constitution, to replace on drafted under military rule.
Calls have also built for reforms to the monarchy, which is accused by protesters of helping to entrench decades of military influence in politics.
Protests have been largely peaceful.
The only specific incident cited by the government for the imposition of emergency measures was one in which Queen Suthida's motorcade was jeered by protesters, but it also said protests were damaging the economy and national security.
Police said on Friday that two men would be charged with attempted violence against the queen, which carries a possible death sentence.
Protesters have denounced the emergency measures and the arrest of some 40 protesters in the past week and are planning another demonstration at 5:00 pm (1000 GMT) in Bangkok on Friday.
Parliamentary opposition parties also condemned the emergency measures.
"Pheu Thai Party calls on General Prayuth Chan-ocha and the state officials to lift the emergency decree and to stop intimidating the people in all manners and to release those who were arrested immediately," said the party, which has the most seats in parliament.