The Thai military has taken control of the government in a coup, the country's military chief announced in a national address Thursday.
Military officials also imposed a curfew from 10 p.m. to 5 a.m. local time (11 a.m. to 6 p.m. ET), authorities said in a televised address.
The developments are the latest in a chain of failed attempts to defuse tensions that have simmered since November. The discord has its roots in politics, and led both pro- and anti-government factions to fight over the country's leadership.
The military on Tuesday imposed martial law in an attempt to end the instability, but said it was not a coup. Now, it has taken power outright.
The move came after rival factions were unable to come up with a suitable agreement to govern, the military chief said.
Hours earlier, members of the military and opposition parties met for a second day to try to find a solution to the crisis.
Members of the political parties involved in the talks were seen under military escort after the meeting. A lawyer for the pro-government "Red Shirts" confirmed that the military had detained the movement's leaders.
Gunshots were heard Thursday at the site in Bangkok where the Red Shirts have been protesting. A former national security chief described these as warning shots to get the crowd to leave.
In his address, the military chief, Gen. Prayuth Chan-ocha, told citizens that despite the coup, it should be business as usual. All civil servants and officials should report to work, he said, and anyone who has weapons -- such as police -- should not make any attempt to move those without orders.
The military also said it will provide security to foreigners, including vacationers and diplomats.
At the same time, the military ordered all state-run, satellite and cable TV providers to carry only the signal of the army's television channel.
It also announced that all schools in Thailand will be closed for three days, starting Friday.
The people of Thailand are all too familiar with coups. Thursday's coup was the 12th successful military takeover since Thailand became a constitutional monarchy in 1932.
During the meetings this week, Thai election officials said the caretaker Prime Minister and his Cabinet should resign and a new interim government should be named ahead of elections to be held in six to nine months.
But interim Prime Minister Niwatthamrong Boonsongpaisan rejected that proposal.
Among those invited to the meetings were the chairman of the election commission, the acting Senate house speaker, the leader of the governing Pheu Thai Party, the leader of the opposition Democrat Party, the leader of the anti-government protesters and the leader of the Red Shirts.
Deep-seated tensions in Thailand in recent months have caused deadly clashes, paralyzed parts of the capital and brought down Prime Minister Yingluck Shinawatra.
Rights groups sound alarm on martial law
The military, which has a long history of interfering in Thai politics, stepped into the fray Tuesday with its sudden declaration of martial law -- without giving any warning to the acting Prime Minister.
"They took this action unilaterally," an aide to the Prime Minister told CNN, describing the situation earlier this week as "half a coup d'etat."
Human rights activists warned the imposition of martial law is a major step away from democracy and lacks safeguards. Human Rights Watch said it "threatens the human rights of all Thais."
The law includes restrictions on where protesters can gather, what TV and radio broadcasters can air and social media posts.
How the chaos unfolded
Thailand has been hit by bouts of political unrest over the past decade.
The current wave was triggered in November by Yingluck's botched attempt to pass an amnesty bill that would have allowed the return of her brother Thaksin Shinawatra, another former prime minister who lives in exile. A military coup deposed Thaksin in 2006.
Groups opposed to the government seized on the amnesty bill furor and began large-scale protests in central areas of Bangkok.
In an attempt to defuse tensions, Yingluck called early elections. But the Democrat Party boycotted the February election, and Yingluck's opponents blocked voting in enough districts to prevent a valid outcome.
The leaders of the anti-government protesters say elections -- which the Shinawatra family's populist Pheu Thai Party is likely to win -- aren't the way to resolve the crisis. They say they want the establishment of an unelected "people's council" that would oversee political changes.
Yingluck, who first took office in 2011, stayed on after the disrupted election as a caretaker Prime Minister. But the Constitutional Court forced her from office two weeks ago, finding her guilty of violating the constitution over the appointments of top security officials.
Yingluck has denied breaking the law.