Thais filled schoolyards, temples and government offices to vote Sunday in the first election since a 2014 coup, with high turnout forecast from a public who received a cryptic last-minute warning from the king to support "good" leaders to prevent "chaos".
Thailand is a constitutional monarchy and the palace is nominally above politics.
But the institution retains unassailable powers and is insulated from criticism by a harsh royal defamation law.
Sunday's election pits a royalist junta and allies against the election-winning machine of billionaire ex-premier Thaksin Shinawatra and an unpredictable wave of millions of first-time voters.
The kingdom remains bitterly divided despite the junta's pledge to rescue it from a decade-long treadmill of protests and coups.
Politicians across the spectrum fear a stalemate under election rules, written by the junta, which limit the chances of any single party emerging with a comfortable parliamentary majority.
But the lopsided set-up did not stop enthusiastic voters from turning out across the country, from ethnic Malay Muslims in the "Deep South" to residents in Mr Thaksin's northern hometown of Chiang Mai.
There are 51 million eligible voters and more than seven million first-timers aged 18-25.
"I want to see Thailand become more democratic and inequality eased from society", said insurance company employee Pattrapong Waschiyapong at a Bangkok polling station.
The palace statement, unprecedented on an election eve in recent history, added further intrigue to a vote that has repeatedly threatened to tip into chaos before a single ballot was cast.
It reiterated comments by late king Bhumibol Adulyadej from 1969 calling for people to "support good people to govern the society and control the bad people" to prevent them from "creating chaos".
King Maha Vajiralongkorn urged the public to "remember and be aware" of the remarks of his father, who died in 2016.
All television stations repeated the rare statement moments before polls opened.
While there were no further clues as to who those "good people" might be, the phrase - "khon dee" in Thai - is habitually attached to royalist, establishment politicians.
The chief of the army - an institution which has carried out 12 coups in under 90 years and trails its partnership with the monarchy - called the palace statement a "good thing".
Another royal command in February torpedoed the candidacy of the king's elder sister Princess Ubolratana for prime minister of a party linked to Thaksin, a divisive ex-premier toppled by a 2006 coup.
Mr Thaksin has lived in self-exile since 2008, but he looms large over Sunday's election.
His affiliated parties have won every Thai election since 2001, drawing on loyalty from rural and urban poor.
On Friday Ubolratana was guest of honour at the glitzy Hong Kong wedding of Mr Thaksin's daughter - with photos of the tycoon and the princess hugging and smiling going viral.
In Bangkok Sudarat Keyuraphan, the prime ministerial candidate for the largest Mr Thaksin-linked party Pheu Thai, noted the "euphoria" at the ballot box.
With only a few hours to go before polls closed, an Election Commission official estimated turnout at more than 80 percent.
He also said there had been 57 complaints about vote buying since January.
The junta party, which is proposing army-chief-turned premier Prayut Chan-O-Cha for civilian prime minister after the polls, is under intense pressure to avoid humiliation in what is effectively a referendum on its popularity.
Prayut toppled the civilian government of Mr Thaksin's younger sister Yingluck in 2014.
The army and its allies in the Bangkok elite loathe the Shinawatras, accusing the clan of toxifying Thai politics and society with money, nepotism and graft.
The Mr Shinawatras say they have simply recognised the economic and democratic aspirations of Thailand's majority.
This time the junta has written new election rules aimed at curbing the number of seats big parties specifically Pheu Thai can win.
Pheu Thai is expected to again sweep up the north and northeastern heartlands as it seeks to head an anti-junta coalition.
A 250-member junta-appointed senate and a new proportional system were meant to have manoeuvered Prayut and the junta party Phalang Pracharat into pole position.
With senate votes in hand, the party needs just 126 lower house seats to secure a parliamentary majority.
It can cross that line comfortably in alliance with smaller parties.
Pheu Thai, however, needs 376 lower house seats to command an overall majority near impossible without complex tie-ups across pro-democracy factions.
"A deadlock is very likely," political scientist Napisa Waitoolkiat of Naresuan University told news agency AFP.
But Pheu Thai lacks star power without the Mr Shinawatra duo in the running and many younger voters are enamoured by telegenic billionaire Thanathorn Juangroongruangkit.
The political newcomer's Future Forward party has won fans with strong social media messaging and its anti-junta stance.
Others with less clear cut loyalties could play a decisive role, including the Democrats led by former premier Abhisit Vejjajiva.