The surprise announcement also granted the army wide-ranging powers to enforce its decision.
The military insisted that its assumption of responsibility for national security was not a coup.
Martial law comes amid a long-running political crisis, and months of escalating tensions between the government and the opposition.
Correspondents say the move could enrage supporters of the government, especially if it is seen as amounting to a coup. The army has staged at least 11 coups since the end of the absolute monarchy in 1932.
Roads in the capital, Bangkok, have been blocked off by tanks.
The military has taken over TV and radio stations, and ordered media censorship in the interests of “national security”.
Soldiers have also moved into the main government building, which has been unoccupied following months of violent demonstrations by opponents who want to be rid of an administration they say is corrupt.
Both pro and anti-government protesters have been told not to march anywhere in order to prevent clashes.
An announcement on military-run TV said martial law had been imposed “to restore peace and order for people from all sides”.
“The public do not need to panic but can still live their lives as normal,” it said.
The military statement was signed by army chief Prayuth Chan-Ocha, citing a 1914 law that allows it to intervene during times of crisis.
The chief security advisor to the interim prime minister said the government had not been consulted about the army’s decision, but says it remains in office.
“Everything is normal except the military is responsible for all national security issues,” said Paradorn Pattanatabut.
An army spokesman also insisted the imposition of martial law would have no impact on the caretaker government.
Observers say the deadlock in south-east Asia’s second-largest economy has got worse since Yingluck Shinawatra dissolved the lower house of parliament in December, and a court ordered her removal earlier this month for abuse of power.
On Monday, acting PM Niwatthamrong Boonsongphaisan insisted his government would not resign, resisting pressure from anti-government protesters.
qUWmFPQ0SJsThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…