Media playback is unsupported on your device Media caption Jonathan Head in Bangkok: "The question is, what will the army do now?"

Thailand's acting PM has issued a plea for the army to act peacefully and within the constitution following its imposition of martial law.

Niwatthamrong Boonsongphaisan also said he had asked for new elections to be called for August.

Thailand has seen six months of unrest between government and opposition.

The anti-government protesters oppose elections and vowed that martial law would not affect their campaign to topple the administration.

The army announced martial law on television at 03:00 local time (20:00 GMT Monday) with the intention to "preserve order and bring back peacefulness".

It cited a 1914 law that allows intervention during times of crisis but insisted this was not a coup.

Image copyright Getty Images Image caption Troops have blocked roads in Bangkok and taken over media buildings

Image copyright AP Image caption The atmosphere at the moment appears calm

Army chief Gen Prayuth Chan-Ocha said martial law would remain until "the country is safe and there is stability".

Soldiers have taken over TV and radio stations in Bangkok and have moved into the currently unoccupied government building.

Mr Niwatthamrong later issued a statement saying: "The government wishes the same for national peace and hopes that the martial law is imposed by way of peaceful means and equality with no violence."

It continued: "This action of the Royal Thai Army must be under the principles of constitution and democracy with the king as head of state."

Media playback is unsupported on your device Media caption Thailand's martial law - explained in 60 seconds

Mr Niwatthamrong later said he was "talking to the army chief's side and there are many pressing issues we need to discuss, including elections and reform".

He said he had asked the Election Commission to set an election date of 3 August.

Analysis: Jonathan Head, BBC News, Bangkok

The army insists its imposition of martial law does not amount to a coup, and it is trying to operate with as light a footprint as possible.

Both the government and its red-shirt supporters have accepted the army commander's word, that it is not taking over political power.

But none of this resolves the intractable political conflict which has afflicted Thailand for eight years. If all the army does is maintain security, the problem will remain unresolved, and governance will be crippled.

If the army tries to impose its own solution though, what at the moment seems like a "half-coup" could well become a complete one, an outcome the red-shirt movement has said it will rise up against and resist.

'Civil uprising'

However, the BBC's Jonah Fisher in Bangkok says that the anti-government demonstrators have made it clear they do not regard elections as a way out of the crisis.

Protest leader Suthep Thaugsuban said in a speech to supporters: "Martial law does not affect our civil uprising... We still retain our right to demonstrate against this tyrannical government."

Image copyright AFP Image caption Anti-government protesters have vowed to continue their campaign

The government would be favourite to win any elections and the opposition believes there is a clause in the constitution that will allow the upper house of parliament to remove Mr Niwatthamrong and appoint a new leader.

Gen Prayuth urged "all sides to come and talk to find a way out for the country".

He pledged the army would take action against those using weapons or harming civilians, but added: "Don't worry. Everything will still go on normally. We will try not to violate human rights too much."

The army's public relations Twitter account said that the rival groups would still be able to hold rallies in Bangkok, but in separate, designated areas to prevent clashes.

Thailand's martial law act of 1914

Gives the army chief control without PM's assent

Grants the military full powers to:

Summon officials and individuals for investigation Search and seize individuals or items Order compulsory military service and forced labour Prohibit assemblies, media coverage, advertising, public transport Destroy "enemy" dwellings and build army barracks anywhere

Thailand's turbulent history of military coups

A leader of the pro-government "red shirt" protesters, Jatuporn Prompan, warned the army not to attempt a coup.

Mr Jatuporn said: "If there is an overthrow of democracy or if General Prayuth goes beyond martial law and stages a coup or overthrows the constitution, the Red Shirts have no other choice, because we have to protect democracy. We will fight to the end."

The army has staged at least 11 coups since the end of the absolute monarchy in 1932.

The recent unrest began late last year, when Ms Yingluck dissolved the lower house of parliament and demonstrators blockaded several areas of Bangkok.

Ms Yingluck called a snap election in February that her party was widely expected to win but it was later annulled.

This month a court ordered Ms Yingluck's removal for alleged abuse of power.

Thailand has faced a power struggle since Ms Yingluck's brother, Thaksin Shinawatra, was ousted by the military as PM in 2006.

Since then, there have been periodic anti-government protests.