The Thai government has announced an emergency decree to stem largely peaceful protests in Bangkok, including a ban on large gatherings.

In a televised announcement read out by police it said urgent measures were needed to “maintain peace and order”.

On Thursday morning police arrested several activists, including three key protest leaders.

The student-led democracy movement has called for the prime minister to resign and curbs on the king’s powers.

The emergency measures came into effect at 04:00 local time on Thursday (21:00 GMT on Wednesday).

Police said they arrested about 20 people, but did not confirm their names.

The BBC has learned that those arrested include key protest leaders – the human rights lawyer Anon Nampa, student activist Parit Chiwarak, widely known by his nickname “Penguin”, and Panusaya Sithijirawattanakul.

In a widely-watched livestream video police officers were seen reading out charges to Ms Panusaya in a hotel room. Another video showed police putting her into a car as she and her supporters chanted slogans.

Mr Anon, 36, was the first to openly break the taboo on discussing Thailand’s monarchy by calling for reforms in August. Ms Panusaya became one of the most prominent faces of the protests since she delivered a 10-point manifesto urging royal reform later that month.

The student daring to challenge Thailand’s monarchy
Why young people are protesting in Thailand
Both men have been arrested previously over the student-led protest movement that has swept Bangkok since it gained momentum in July. Ms Panusaya, 21, had not been arrested until now.

What’s the new decree?
The decree from Prime Minister Prayuth Chan-ocha, a former junta leader, was announced on state television.

It said protesters had intended to instigate an incident leading to “chaos and incitement of conflict and public disorder” and caused “obstruction to the royal motorcade”. Some protesters on Wednesday had raised the three-finger salute, a symbol of the movement, at a convoy carrying the queen as they were pushed back by ranks of police.

Shortly after the decree took effect, Thai riot police cleared protesters from outside the prime minister’s office. Some tried to resist, using makeshift barricades, but they were pushed back.

Hundreds of police were seen on the streets even after protesters were dispersed.

In addition to limiting gatherings to four people, the decree puts restrictions on the media, prohibiting the publication of news “that could create fear or intentionally distort information, creating misunderstanding that will affect national security or peace and order”.

It also allows authorities to stop people from entering “any area they designate”.

Why are students protesting?
The growing student-led democracy movement has become the greatest challenge in years to Thailand’s ruling establishment.

Protesters are demanding the resignation of Mr Prayuth, a former army chief who seized power in a 2014 coup before becoming premier last year after a controversial election. They also seek the rewriting of the constitution, whose amendments in recent years have been disputed, as well as an end to the harassment of state critics.

Mr Prayuth rejects accusations the electoral laws were fixed in his favour.

Since August the calls for change have grown to include reform to the monarchy, sparking unprecedented public discussion of an institution long shielded from criticism by law.

The students risking it all to challenge the monarchy
Thailand’s lese-majeste law explained
There have been many protests against Mr Prayuth since the coup but a new wave of demonstrations began in February after a court ordered a fledgling pro-democracy opposition party to dissolve.

The Future Forward Party had proved wildly popular with young, first-time voters and garnered the third-largest share of parliamentary seats in the March 2019 election, which was controversially won by the incumbent military leadership.

Protests were re-energised in June when prominent pro-democracy activist Wanchalearm Satsaksit went missing in Cambodia, where he had been in exile since the 2014 military coup. His whereabouts remain unknown and protesters accuse the Thai state of orchestrating his kidnapping – something the police and government have denied.

The satirist who vanished in broad daylight
Since July there have been regular student-led street protests.

Rallies in the capital over the weekend were some of the largest in years, with thousands defying authorities to gather and demand change.

The protesters’ calls for royal reform are particularly sensitive in Thailand, where criticism of the monarchy is punishable by long prison sentences.