Samak declared the emergency after one person was killed and dozens were injured in Bangkok as police and both pro- and anti-government protesters clashed overnight on Monday.
Shortly after Samak spoke, a new crisis confronted his government.
The election commission recommended that his People's Power Party (PPP) be disbanded for alleged electoral fraud committed during the elections in December.
The commission forwarded its findings to the attorney general's office to decide whether to submit the case to the constitutional court for a final ruling.
This process could take months.
Samak and other party leaders would be banned from politics for five years if the ruling is upheld.
Al Jazeera's correspondent, Selina Downes, reported many were saying that the unanimous vote by the five-member commission could be the beginning of the end of the PPP.
Tuesday's move was reminiscent of the court dissolving of Thaksin's Thai Rak Thai party last year. The party later regrouped under the PPP flag.
Thai newspapers have reported that the PPP is preparing for the worst and is lining up a new "shell" party to admit all its MPs, who could try to cobble together another coalition government.
Kudeb Saikrachang, the PPP spokesman, told Al Jazeera that party MPs already had another party in mind in case the PPP were to be dissolved.
Under the sweeping emergency powers announced on television and radio, all public gatherings in the capital are banned and restrictions have been imposed on media reports that "undermined public security".
"There is an urgent need to solve all these problems quickly. Therefore the prime minister declares a state of emergency in Bangkok from now on," the announcement read.
Around 400 soldiers armed with batons and shields were sent to back up police struggling to contain the street battles in the worst violence since the People's Alliance for Democracy (PAD) launched its street campaign against the prime minister in May.
Kudeb told Al Jazeera that the PPP had "no part" in the violence.
"We don't support violent means whatsoever," he added.
By sunrise on Tuesday, General Jongrak Jutanond, Bangkok's police chief, said "the situation is now under control".
Some schools were shut in Bangkok on Tuesday, but morning rush-hour traffic was flowing as normal and the airport, the main gateway for foreign tourists visiting one of Asia's top holiday destinations, remained open.
Samak called emergency rule the "softest means available" for restoring calm.
In a nationally televised news conference on Tuesday, he gave no timeframe for how long the decree would stay in effect but said it would be over "moderately quickly".
|The protesters have vowed to force out Samak's government [EPA]
The prime minister had said last week that he had hoped to avoid declaring an emergency, but said he was left with little choice after violence erupted.
"I did it to solve the problems of the country," he said. "Because the situation turned out this way, I had no other choice."
Al Jazeera's correspondent Downes said the emergency law gave the prime minister absolute control over the situation, as he had made himself defence minister when he was elected in January and was therefore in charge of the military.
Under a state of emergency, Samak has special powers outside of the constitution to deploy police and soldiers on the streets to quell protests.
Our correspondent said there had been mounting pressure on the government to get a handle on the increasingly chaotic situation.
The PAD had been in the driving seat after storming and occupying the Government House compound a week ago.
Many analysts said there appeared no other way out of the situation.
On Monday, the PAD had announced that its supporters in state enterprise unions would cut off water, electricity and phone service to government offices as part of a "general strike" set for Wednesday.
"There are not enough jails to put us all into"
Chamlong Srimuang, anti-government protest leader
Alliance supporters said they also would delay departures of flights of the national airline.
They were already disrupting rail service and planned to cut back public bus transportation as well.
Samak has repeatedly said he would not be bullied by a mob into resigning or dissolving parliament and calling fresh elections.
Leaders of the anti-government protest movement that has occupied the prime minister's official compound for the past week said they would not budge.
"There are not enough jails to put us all into," Chamlong Srimuang, one of the leaders of the PAD that is leading the anti-government protests, told thousands of supporters inside the compound camped in behind makeshift barricades of razor wire and car tyres.
Samak's announcement blamed unnamed people for "wreaking havoc" and undermining the economy and national unity.
Thais Al Jazeera spoke to were angry and frustrated that they were "back to square one" two years after Thaksin Shinawatra was ousted in a military coup after weeks of street protests against the then prime minister.