Thailand's army declared martial law on Tuesday, saying it intends to restore order after six months of anti-government protests that have left the country without a proper functioning government, but that the move did not constitute a coup, military officials said.

Thailand has been stuck in political limbo since Prime Minister Yingluck Shinawatra and nine of her ministers were dismissed on May 7 after a court found them guilty of abuse of power. An acting prime minister has since taken over.

The caretaker government was still in office, said deputy army spokesman Colonel Winthai Suvari, following the surprise announcement on television at 3 a.m. Tuesday local time.

"This martial law is just to restore peace and stability, it has nothing to do with the government. The government is still functioning as normal," Winthai told Reuters.

Justice Minister Chaikasem Nitisiri told The Associated Press the army had not consulted the Cabinet. He played down the move, saying the caretaker government was still running the country but that the army was now in charge of security.

"Security matters will be handled solely by the military, and whether the situation intensifies or is resolved is up to them," he said. "There is no cause to panic. Personally, I welcome the move."

The military, which put down a protest movement in 2010, has staged 11 coups since Thailand became a constitutional monarchy in 1932, the last one in 2006 to oust former Prime Minister Thaksin Shinawatra who was toppled after being accused of corruption, abuse of power and disrespect for King Bhumibol Adulyadej.

The Thai army clarified that both pro-government and anti-government protesters had to remain where they are, prohibiting demonstrations.

The military statement was issued Tuesday by army chief Gen. Prayuth Chan-Ocha, who cited a 1914 law that gives the authority to intervene during crises. He said the military took action to avert street clashes between political rivals.

"The Royal Thai Army intends to bring back peace and order to the beloved country of every Thai as soon as possible," he said. We "intend to see the situation resolved quickly."

A senior U.S. official said last week the United States was "reasonably confident" the military in close ally Thailand would exercise restraint and not intervene in the crisis.

Amy Searight, U.S. deputy assistant secretary of defense for South and Southeast Asia, said it was "reasonable to think there were lessons learned" after the Thai military ousted Thaksin, which saw the U.S. cut aid to the country.

Troops were patrolling in Bangkok and had secured television stations, one Thai army general said.

"We declared a state of emergency, it's not a coup. Because of the situation, it's not stable, they kill each other every day," the general, who declined to be identified, told Reuters.

"We need cooperation from them to announce to the people 'do not panic, this is not a coup,'" the general said.

Brad Adams, Asia Director for Human Rights Watch, said denounced the army move, calling it "a de facto coup."

"The military has pulled a 100 year old law off the shelf that makes the civilian administration subordinate to the military, effectively rendering the executive, legislative and judicial branches powerless," Adams said.

U.S. State Department spokesperson Jen Psaki said the U.S. was "very concerned about the deepening political crisis in Thailand."

Despite soldiers on patrol, life remained largely unaffected, with schools, businesses and tourist sites open and traffic flowing as usual. In front of one of the country's most luxurious shopping malls, bystanders gawked at soldiers in jeeps mounted with machine guns who briefly diverted traffic. The mood wasn't tense; passers-by stopped to take cell phone pictures of the soldiers.

Acting Prime Minister Niwatthamrong Boonsongphaisan on Monday ruled out resigning as a way out of a protracted political crisis that is stunting economic growth, as anti-government protesters stepped up pressure to remove him and install a new administration.

Commerce Minister Niwatthamrong replaced Yingluck, but the anti-government protesters say he has no legal standing, and they want a "neutral" government to push through reforms.

The government and its supporters view a general election as the best way to solve the crisis — the ruling Puea Thai Party would be well placed to win — but a vote tentatively scheduled for July 20 looks to be off the table.

Jatuporn Prompan, leader of pro-government "red shirt" activists said he and his followers would sustain a protest in Bangkok's western outskirts until the restoration of "democratic principles" leading to an election.

"That's fine," Jatuporn told Reuters when asked about his reaction to the declaration of martial law.

"We will stay here and continue our protest until the country is back to democratic principles, which will lead to an election and getting a new elected prime minister."

A Feb. 2 election was disrupted by opposition supporters and then declared void by the Constitutional Court. The protesters say they will disrupt any vote before changes to the electoral system push through.

Wire services