BANGKOK  - Thailand’s military hosted ground-breaking talks Wednesday between warring political rivals after imposing martial law to prevent the deeply divided kingdom degenerating into another “Ukraine or Egypt”.

The opposing camps and other top officials met for more than two hours under heavy guard in Bangkok in what one hardline supporter of the elected government called a good atmosphere - a rare glimmer of detente in the long-running political conflict.

The crisis broadly pits a Bangkok-based royalist elite and its backers against the billionaire family of former premier Thaksin Shinawatra, who was ousted by the military in 2006 but still enjoys strong support in northern Thailand.

There was no breakthrough at the talks chaired by army leader General Prayut Chan-O-Cha, who invoked martial law Tuesday, and another meeting was called for Thursday. “They’re all determined to find the best solution for the country,” said army spokesman Werachon Sukhonthapatipak.

“Of course, the very first day we are not able to come up with the solution. But we give them some homework to go back and consult with their supporters, with their team,” he told reporters.

The meeting included representatives of the government, the ruling and opposition parties and of the election commission and Senate, as well as the heads of the pro- and anti-government protest camps.

“The atmosphere at the meeting was good. At least we had a chance to talk to each other,” said Thida Thavornseth, a core leader of the pro-government “Red Shirt” movement. But observers warned that the military’s efforts to end the crisis through martial law risked inflaming tensions unless the outcome is accepted by all sides.

“The next few days are crucial because if the army is going to play a broker role, it has to do so quickly,” said Thitinan Pongsudhirak, political analyst at Bangkok’s Chulalongkorn University.

“We will see some resistance to martial law - martial law will be tested - so the longer it waits, the worse it will be for the military.”

Caretaker Prime Minister Niwattumrong Boonsongpaisan, who replaced Yingluck Shinawatra after a controversial court ruling ousted her this month, has called for fresh elections on August 3.

But the opposition wants vaguely defined reforms first to tackle graft and has vowed to stay on the streets until it has eradicated the influence of the “regime” it says is led from abroad by Thaksin, who lives in self exile to avoid prison for a corruption conviction.

Prayut, 60, has said he invoked martial law to prevent political tensions spiralling out of control following months of deadly anti-government protests, and insists he intends to broker a solution. But critics have branded his actions a de facto coup.

“I will not allow Thailand to be like Ukraine or Egypt,” Prayut said Tuesday, according to remarks released by the military.

Thailand has been racked by nearly seven months of streets protests that have left 28 people dead and hundreds wounded.

In a new sign of its weakening hold on power, the caretaker cabinet has been barred by the army from accessing the emergency headquarters it had been using at a defence ministry office in the capital.

“The government is now using a safe house,” said a government official who did not want to be named.

Bangkok was calm Wednesday, with unfazed Thais going about their business and the city’s bustling street life carrying on amid a noticeably lighter military presence compared to the day before, when armed troops were deployed.

But martial law gives the military wide power to ban public gatherings, restrict people’s movements, conduct searches, impose curfews and detain suspects for up to seven days.

The military has ordered 14 satellite television stations to suspend broadcasts as it tightens its grip on the media, to the alarm of human rights campaigners.

Representatives from Internet service providers were also summoned to a meeting with the army Wednesday and instructed to “urgently block” any content deemed to threaten peace and order, according to a statement from the telecoms regulator.

Thailand’s longtime ally the United States has said it does not believe the army had staged a coup - avoiding sanctions required under US law - but urged respect for democracy.

Parties led by Thaksin or his allies have won every election over the past dozen years, to the dismay of an entrenched Bangkok-based elite who accuse him of corruption and posing a threat to the monarchy.