BANGKOK -- Thailand's government on Thursday cancelled a state of emergency it had declared last week for Bangkok in a gesture offered by the embattled prime minister to cool student-led protests seeking democracy reforms.

The decree had banned public gatherings of more than four people and allowed censorship of the media, among other provisions. It was challenged in court by an opposition party and a group of university students.

The revocation of the emergency decree, effective at noon Thursday, declared that the situation had been mitigated and could now be dealt with by existing laws.

Prime Minister Prayuth Chan-ocha went on national television on Wednesday night to appeal to the protesters to reduce political tensions and promised to lift the emergency measure.

"I will make the first move to deescalate this situation," he said. "I am currently preparing to lift the state of severe emergency in Bangkok and will do so promptly if there are no violent incidents."

As he was speaking, protesters marched near Government House, his office, to demand he step down. They also asked for the release of their colleagues who were arrested in connection with earlier protests.

They said that if their demands were not met, they would return in three days. Although the protesters pushed their way through police lines, neither side resorted to violence.

There were no large demonstrations on Thursday, as some protesters said they were taking a rest day. Wednesday had marked the eighth straight day of rallies.

The protesters are pressing for a more democratic constitution and reforms to the monarchy. The implicit criticism of the royal institution has stirred controversy because it traditionally has been treated as sacrosanct and a pillar of national identity.

On Wednesday, royalists held rallies in several cities, in many cases led by civil servants, in what they said was defence of the monarchy. At a small rally in Bangkok, there were fights between anti-government protesters and palace supporters.

Friday could see the royalists turn out again, as it is Chulalongkorn Day, a public holiday honouring one of the country's most revered kings.

Prayuth, in the taped speech, pleaded with his countrymen to resolve their political differences through Parliament.

The government on Tuesday approved a request to recall Parliament to deal with the political crisis in a special session from next Monday to Wednesday.

The appeal for a solution in Parliament was unlikely to win over protesters, as some of their core complaints are that the constitution and the political structure it created are undemocratic, in part because it was written after a 2014 military coup. Prayuth himself led that coup, which toppled an elected government during political unrest that featured widespread street protests.

The cancellation of the state of emergency came as Bangkok Civil Court was preparing to rule on motions to revoke the decree on the basis that it illegally abridged freedom of assembly.

The opposition Pheu Thai party had been one of the complainants, and the head of its team at the court said Thursday that he was not impressed that Prayuth had lifted the decree.

"He's really doing it to protect himself. Why? Because if he didn't lift the emergency decree today, and the court ordered the temporary protection of the protesters, it would mean all his orders and announcement relating to this were illegal," said lawmaker Cholanan Srikaew.

Separately, the official committee supervising the fight against the coronavirus said the government is renewing for the seventh time a national state of emergency that had been imposed in March to contain the disease. It gives provincial governors powers to restrict gatherings, movement and media reports.

Authorities on Wednesday suffered a legal setback when a judge barred them from implementing orders banning several media outlets because they failed to follow proper procedures.

Police sought to impose censorship on media reporting of the protests, citing what they called "distorted information" that could cause unrest and confusion.

In Geneva, the UN's human rights office issued a statement saying that its experts urged Thailand's government to honour the rights of peaceful assembly and free speech.

"The Thai people should be allowed to freely speak their mind and share their political views, both online and offline, without prosecution," it said.

Correction:

This story has been corrected to show that opposition lawmaker Cholanan Srikaew spoke on Thursday, not Wednesday.