Thailand's two election winning parties are working to overcome the built-in advantage for a military-backed bloc and form a government they say must reflect the will of voters who want to end the long military domination of politics.
They face a battle that could take weeks or months and ultimately their success is not guaranteed - and that is assuming that they can stick together.
In public, the parties are claiming a mandate of the people's will - with the leader of surprise winner Move Forward party saying that his party along with several others pro-democracy parties together have 311 seats in the 500-seat lower house of parliament.
In almost any other country, that would be a clear path to government. But this is Thailand, where the powerful military toppled the last elected government in 2014 and later created an unelected 250-seat Senate that also participates in a combined vote on who becomes prime minister.
Analysts say that what is likely to happen next - and is probably already happening - are behind-the-scenes negotiations to bring others into the proposed coalition to get to the actual number of votes, 376, needed to get a prime minister and form a government.
While Move Forward was celebrating its historic victory this week - and its ally, the Pheu Thai party, was congratulating it and calling for others to join them in forming a government, many believe that it is actually Pheu Thai that has the most options in the coalition talks - and not all of them include Move Forward.
"There are differences in terms of political strategies of these two parties," said Prajak Kongkirati, political scientist at Thammasat University.
"Move Forward chooses an uncompromising mode of change while Pheu Thai choose a compromising mode of change," Prajak said.
Move Forward's sole prime ministerial candidate, Pita Limjaroenrat, could face disqualification if the Election Commission takes up a complaint filed against him that he failed to sell shares in a media company before the campaign, which breaches the rules - the same fate that befell his party's founder in 2019.
Key to any stable coalition could be two other parties in parliament: the Bhumjaithai party of health minister Anutin Charnvirakul with 70 seats; and with 25 seats the Democrats, a party that has sided with the military-backed governments in the past.
Then there is, with 40 seats, the now-ruling Palang Pracharat party led by General Prawit Wongsuwon, who was part of the military junta led by army chief Prayuth Chan-ocha who seized power in 2014. Prawit and Prayuth parted ways before the election and Prayuth's own offshoot party fared poorly.
But analysts say all three of these parties are unlikely to join a coalition led by Move Forward because of a contentious campaign promise to amend strict laws against criticising the king.
Move Forward says it only wants to change the law to prevent it being misused. More than 240 people, many of whom took part in protests against the pro-military government, have been charged under the law, which carries a sentence of up to 15 years in prison.
The monarchy is traditionally held in such high regard that the mere hint of criticising it, which some royalists would say includes attempts to amend the law protecting it, could make Move Forward anathema as the leader of a government to most other parties.
Pheu Thai has been far more measured in its messaging on the monarchy - and that could leave it with more options.
"Pheu Thai is holding its cards close to its chest," said Thitinan Pongsudhirak, a political scientist at Bangkok's Chulalongkorn University.
"Pheu Thai might still not want to be in a coalition with Move Forward because of Move Forward's agenda on lese majeste law and on monarchy reforms."
As strange as it might seem, a coalition favoured by Pheu Thai could include the Palang Pracharat party, even though its leader, Prawit, was as a military man associated with the ousting of two governments led by the populist party, founded by former telecommunications tycoon Thaksin Shinawatra, in 2006 and again in 2014.
Self-exiled Thaksin has recently said he would like to come home and making a deal with the Palang Pracharat might make that possible - and win over the votes of the military-appointed Senate for a Pheu Thai prime minister.
However, Joshua Kurlantzik, senior fellow for Southeast Asia at the Council on Foreign Relations, said Pheu Thai was unlikely to opt for another coalition.
"I think Pheu Thai will stick with Move Forward," he said, adding abandoning its ally would make Pheu Thai look as if it was betraying the will of the people.
There is another possibility, one that sounds unlikely given the voters' repudiation of military-backed parties but is mathematically possible: That is that members of the Senate and the pro-military parties that lost on Sunday could vote in a conservative prime minister of their choosing.
That would be a clear denial of the people's will and risks a return of the protests that have plagued Thailand in recent decades.
But for longtime analyst Zachary Abuza, professor at the National War College in Washington, it's a very plausible scenario.
"I still think that a conservative coalition ... with Senate backing is far more likely to emerge than a pro-democracy led coalition," Abuza said.
"The will of the people is likely to be thwarted again."