BANGKOK — Early unofficial tallies from a long-awaited election in Thailand showed pro-democracy forces gridlocked with a party seeking to entrench the military in politics, a surprise result that could keep junta head Prayuth Chan-ocha in power.

With 92 percent of the votes counted, the military-linked party, formed as a vehicle to keep the junta in power, had a slightly bigger share of votes than Pheu Thai, the populist party linked to ousted billionaire prime minister Thaksin Shinawatra. 

The new Future Forward Party, led by a 40-year-old liberal and athletic billionaire who has been unequivocal about his desire to end military rule, was in third place. 

The results indicate old divisions in Thailand dissolving to make way for new ones: a fundamental question of whether civilian elected politicians are best placed to lead the country over the army, alongside a deified monarch. It also raises the specter of protests and instability to come, with supporters of a pro-democracy populist movement that is likely to cry foul.

The election will determine the makeup of Thailand’s parliament, which has 500 elective seats. Those elected lawmakers and 250 unelected senators, appointed by the junta, will decide who becomes prime minister. It is unclear how the raw number for votes will translate into seats under a complicated new system of lawmakers elected through constituency races and proportional representation.

The prime minister is chosen by a simple majority. 

As polls opened Sunday morning in Thailand, a hashtag started trending on social media: #OldEnoughtoVoteOurselves. 

Throughout the day, Thailand’s millennials were among the most enthusiastic voters, rushing to reject the dominance of the military junta. They argued with elder relatives, shared political videos on social media and subtly challenged Thailand’s social contract, where the word of the monarchy is absolute, with hashtags. 

“We want to see new things from new people, rather than the same old politicians talking about the same things,” said a 32-year old who wanted to be named only by her nickname, Kob, for fear of repercussion from her government-linked employer. “We want a prime minister that comes from an election, not a coup.” 

Of the 52 million eligible voters in Thailand — almost 70 percent of whom turned up to cast ballots Sunday in the first election since a 2014 coup — about 7 million are young, first-time voters. The leader of Future Forward Party, Thanathorn Juangroongruangkit, has been cited with energizing youths who grew up under military rule, creating a dedicated fan club that mobs the fresh-faced billionaire and clamors for selfies. 

The Washington Post interviewed more than a dozen voters under 35, and most said they picked Thanathorn’s party, while their parents and grandparents voted for the army party.

The generational split mirrors trends across the world, including in the United States and Britain, where the young have backed liberal causes while their elders have leaned conservative. 

The hashtag appeared to be a response to an unusual statement from Thai King Vajiralongkorn ahead of the vote, in which he encouraged voters to pick “good people” as their leaders and stop “bad people” from obtaining power and causing turmoil. 

Some voters, speaking on the condition of partial anonymity because criticism of the Thai monarchy is a crime punishable by jail time, rejected the paternalistic undertones of the message and said they wanted to make their own choices. Others have explicitly rejected taking political cues from their elders. 

“[In the past] some of us would vote for whoever our parents said are good,” said Noon, a 29-year-old community activist. “But nowadays we can access social media, so we can make our own decision. Since social media is a big factor here, we can understand more about the real problems in Thailand [and] match it with the politicians’ policies.” 

Thailand last voted in an elected government eight years ago, when use of Facebook, Instagram and Twitter was just becoming widespread. In 2017, Thailand had 46 million Facebook users. 

But ahead of the elections, the rules of the game were altered significantly from previous ballots, widely seen as a way to give the junta every electoral advantage and prevent the dominance of parties linked to ousted billionaire Thaksin. 

Many voters confessed that they found the new procedures, where voters could only pick one candidate representing one party — previously there was the option to cast two votes, one for an individual candidate and one for a party — confusing. Some were also perplexed about how best to vote strategically to ensure pro-democracy forces are able to override the military’s advantages and form a government. 

“I had to study all the new regulations and think a lot about this,” said Sakda Pohka, 43, who was torn between the candidate of his choice and a party to which he has long been loyal. “It was confusing for me when I made the decision.” 

Each district has at least two dozen candidates running, many of them smaller proxy parties for the stalwarts that have dominated Thai politics for decades — but still an overwhelming choice for some voters. One 18-year-old, casting her vote for the first time, was so stressed about making the wrong decision that she chose to vote for no one. 

The changes have seemed to have their intended effect, alongside calls from the army party that only it can deliver peace and stability. Analysts have expressed dismay at the early results that show the army-linked party ahead of Pheu Thai, which has won every election since 2001.

Thaksin, the movement’s founder, lives in self-imposed exile, fleeing a string of corruption charges he says are politically motivated. 

Many voters on the outskirts of the city, away from the gargantuan malls and billboards advertising luxury apartments, said they would vote for Pheu Thai as it is the only party that can address the issue of Thailand’s growing inequality. According to a 2018 global wealth survey by financial services company Credit Suisse, Thailand is the most unequal country in the world, with just 1 percent controlling 66.9 percent of the wealth. This disparity has worsened in recent years. 

“The rich aren’t serious about this election. They were not hit by the economic slowdown over the past few years,” said Hemarath Sawadeepol, 28. “But for the grass roots like us, this election is important because we need the changes.”

He runs three shops in a wholesale mall in Bangkok, where he earns just $63 a day, shared among relatives. 

The military-aligned party will need fewer seats than pro-democracy parties to have its pick of the country’s prime minister as it will have the support of 250 unelected senators — a third of the legislature — handpicked by the military government.

As early results were streamed by television networks on Facebook Live, dozens began to comment furiously. “Hopeless, our country is hopeless,” one user said. Another just responded with a string of crying face emoji. By nightfall, a new trending Twitter hashtag had emerged: #PrayForThailand.

Panaporn Wutwanich in Bangkok contributed to this report.