Thais filled schoolyards, temples and government offices to vote Sunday in the first election since a 2014 coup, with a high turnout expected among a public who received a cryptic last-minute warning from the Thai king to support "good" leaders to prevent "chaos".
All television stations repeated the rare statement by King Maha Vajiralongkorn moments before polls opened.
Thailand is a constitutional monarchy and the palace is nominally above the political fray.
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 its 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 ruling 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 Thaksin's hometown of Chiang Mai.
There are 51 million eligible voters and more than 7 million first-timers aged 18-25, adding a dash of uncertainty into the count.
"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.
The statement 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".
Vajiralongkorn urged the public to "remember and be aware" of the remarks of his father, who died in 2016.
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"
The king's intervention is his second in less than two months.
Another royal command torpedoed the candidacy of his elder sister Princess Ubolratana for prime minister of a party linked to Thaksin, a divisive ex-premier toppled by a 2006 coup.
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 huge loyalty from rural and urban poor.
On Friday Ubolratana was guest of honour at the glitzy Hong Kong wedding of 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 Thaksin-linked party Pheu Thai, noted the "euphoria" at the ballot box.
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 Thaksin's younger sister Yingluck in 2014, the twelfth coup in under a century.
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 Shinawatras say they have simply recognised the economic and democratic aspirations of Thailand's majority.
This time the ruling 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 AFP.
But Pheu Thai lacks star power without the Shinawatra duo in the running and many younger voters are enamoured by telegenic billionaire Thanathorn Juangroongruangkit.
The political newcomer's Future Forward party was created last year and has won fans with strong social media messaging and anti-junta stance.
Others with less clear cut loyalties could play a decisive role, including the Democrats led by former premier Abhisit Vejjajiva.
Bangkok, Thailand | AFP