Anti-government protesters have vowed to continue the fight -after Thailand's powerful army declared martial law in a dramatic move.

Troops have been deployed into the heart of Bangkok in a move it said is aimed at stabilising the country after six months of turbulent political unrest.

The surprise operation, which the military insisted is not a coup, places the army in charge of public security nationwide. It comes amid deepening uncertainty over the nation's fate and one day after the caretaker prime minister refused to step down in the face of long-running anti-government protests.

The leader of protesters who have been trying to oust the government for six months said they would continue their fight despite the army chief's call for talks between rival groups.

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

The army chief has said martial law would remain in place until peace and order had been restored.

Although soldiers entered multiple television stations to broadcast the army message, life in the vast metropolis of 10 million people remained largely unaffected.

On a major road in front of one of the country's most luxurious shopping centres, bystanders watched as soldiers in Jeeps mounted with machine guns briefly diverted traffic. The mood was not tense; passers-by stopped to take pictures.

Thailand, an economic hub for south-east Asia, has been gripped by off-and-on political turmoil since 2006 when former PM Thaksin Shinawatra was toppled by a military coup after being accused of corruption, abuse of power and disrespect for King Bhumibol Adulyadej.

His overthrow triggered a power struggle that continues to this day and in broad terms pits Thaksin's supporters among a rural majority in the north and north-east against a conservative establishment in Bangkok and the south.

The army, which is sympathetic to anti-government protesters, has staged 11 coups since the end of absolute monarchy in 1932.

Acting prime minister Niwattumrong Boonsongpaisan - who was not consulted before the army move - called an emergency cabinet meeting to discuss the situation.

Education minister Chaturon Chaisang, however, said in a post on his Facebook page that martial law was not an answer and warned it could "eventually spiral into a situation in which the military has no choice but to stage a coup".

The military statement was issued by army chief Gen Prayuth Chan-Ocha, who cited a 1914 law that gives the authority to intervene during times of crisis. He said the military took action to avert street clashes between political rivals which he feared "could impact the country's security".

Gen Prayuth later called a meeting with senior officials from government agencies, provincial governors and representatives from the country's independent agencies - but not the cabinet. The latest round of unrest started last November, when demonstrators took to the streets to try to oust then-PM Yingluck Shinawatra, Thaksin's sister. She dissolved the lower house of parliament in December in a bid to ease the crisis, and leads a weakened, caretaker government with limited powers.

Earlier this month, the Constitutional Court ousted Ms Yingluck and nine cabinet ministers for abuse of power. But the move did little to resolve the conflict.

And competing protests in Bangkok have raised concerns of more violence. An overnight attack last week on the main anti-government protest site left three dead and more than 20 injured. It raised the toll since November to 28 dead.

"This week looked ominous," said Thitinan Pongsudhirak, director of the Institute of Security and International Studies at Bangkok's Chulalongkorn University. "Martial law is intended to impose peace and order, but the key will be the army treatment of the two sides. If the army is seen as favouring one side over the other, then we could see the situation spiral and deteriorate.

"If the army is seen as even-handed... we could actually see the situation improving."