A military-backed party has taken the lead in Thailand’s first election since a coup in 2014, preliminary results showed, suggesting junta leader and prime minister Prayuth Chan-o-cha could stay in power.

With 89 per cent of votes counted on Sunday, the Palang Pracharat party was first with 7 million votes. Pheu Thai, which was the governing party ousted by the coup, was next with 6.6 million votes.

A new party, Future Forward, which became popular with young voters, had scooped up nearly 4.8 million votes. Voters deserted the Democrat Party, Thailand’s oldest political party, and its leader resigned.

Thais voted for a 500-member parliament, which along with a 250-member junta-appointed senate will decide the next prime minister.

The election was the latest chapter in a nearly two-decade struggle between conservative forces including the military and the political machine of Thaksin Shinawatra, a tycoon who upended tradition-bound Thailand’s politics with a populist political revolution.

Thai Elections Show all 13 1 /13 Thai Elections Thai Elections Supporter of Pheu Thai party cheers while watching television at party headquarters in Bangkok, Thailand, Sunday, March 24, 2019. Voting stations are closed and meaningful results are expected within hours, although many commentators suggest the formation of a new government could take weeks of haggling. (AP Photo/Sakchai Lalit) AP Thai Elections Frustrated supporters of Pheu Thai party watch the election results broadcast on a television, in Bangkok, Thailand, Sunday, March 24, 2019. Figures from Thailand's Election Commission show a military-backed party has taken the lead in the country's first election since a 2014 coup. (AP Photo/Gemunu Amarasinghe) AP Thai Elections A Thai policeman stands next to an empty ballot box which is shown before the voting for the general election at a polling station in Bangkok, Thailand, Sunday, March 24, 2019. Thailand's first general election since the military seized power in a 2014 coup is scheduled to be held on Sunday. (AP Photo/Sakchai Lalit) AP Thai Elections A Thai officer adjusts a chair before the voting for the general election at a polling station in Bangkok, Thailand, Sunday, March 24, 2019. Thailand's first general election since the military seized power in a 2014 coup is scheduled to be held on Sunday. (AP Photo/Sakchai Lalit) AP Thai Elections A Thai voter with a ballot paper in her hand, poses at a polling station in Bangkok, Thailand, Sunday, March 24, 2019, during the nation's first general election since the military seized power in a 2014 coup. (AP Photo/Gemunu Amarasinghe) AP Thai Elections Supporters of Pheu Thai party cheer while watching television at party headquarters in Bangkok, Thailand, Sunday, March 24, 2019. Voting stations are closed and meaningful results are expected within hours, although many commentators suggest the formation of a new government could take weeks of haggling. (AP Photo/Wason Wanichakorn) AP Thai Elections A Thai officer counts ballots as she displays a ballot paper after polling concluded at a polling station in Bangkok, Thailand, Sunday, March 24, 2019. Nearly five years after a coup, Thailand voted Sunday in a long-delayed election pitting a military-backed party against the populist political force the generals overthrew. (AP Photo/Gemunu Amarasinghe) AP Thai Elections Thai election officers count ballots after polling concluded at a polling station in Bangkok, Thailand, Sunday, March 24, 2019. Nearly five years after a coup, Thailand voted Sunday in a long-delayed election pitting a military-backed party against the populist political force the generals overthrew. (AP Photo/Gemunu Amarasinghe) AP Thai Elections Thai Prime Minister Prayuth Chan-ocha of thr Palang Pracharat Party receives flower from supporters during an election campaign rally in Bangkok, Thailand, Friday, March 22, 2019. The political movement that has won every Thai election in nearly two decades is facing its biggest test yet: Squaring off against the allies of the military junta that removed it from power and rewrote the electoral rules with the goal of putting an end to those victories. (AP Photo/Sakchai Lalit) AP Thai Elections The leader of Pheu Thai Party and candidate for prime minister Sudarat Keyuraphan gestures as she delivers a speech during an election rally concluding their campaign ahead of general election in Bangkok, Thailand, Friday, March 22, 2019. The nation's first general election since the military seized power in a 2014 coup is scheduled to be held on March 24. (AP Photo/Gemunu Amarasinghe) AP Thai Elections The leader of Pheu Thai Party and candidate for prime minister Sudarat Keyuraphan walks to a podium to deliver a speech during an election rally concluding their campaign ahead of general election in Bangkok, Thailand, Friday, March 22, 2019. The nation's first general election since the military seized power in a 2014 coup is scheduled to be held on March 24. (AP Photo/Gemunu Amarasinghe) AP Thai Elections Thai Prime Minister Prayuth Chan-ocha of the Palang Pracharat Party receives flowers from supporters during an election campaign rally in Bangkok, Thailand, Friday, March 22, 2019. The political movement that has won every Thai election in nearly two decades is facing its biggest test yet: Squaring off against the allies of the military junta that removed it from power and rewrote the electoral rules with the goal of putting an end to those victories. (AP Photo/Sakchai Lalit) AP Thai Elections Supporters of the Pheu Thai party watch the election results broadcast on a television in Bangkok, Thailand, Sunday, March 24, 2019. Figures from Thailand's Election Commission show a military-backed party has taken the lead in the country's first election since a 2014 coup. (AP Photo/Gemunu Amarasinghe) AP

Mr Thaksin was ousted as prime minister in a 2006 military coup and now lives in exile abroad to avoid a prison term, but parties allied with him have won every election since 2001.

His sister, Yingluck Shinawatra, who led the Pheu Thai government that was ousted in 2014, also fled the country after what supporters said was a politically motivated prosecution.

Mr Prayuth, the blunt-speaking army chief who led the 2014 coup, was hoping to extend his hold on power after engineering a new political system that aims to stifle the influence of big political parties not aligned with the military.

About 51 million Thais were eligible to vote. Leaders of political parties opposed to military rule urged a high turnout as the only way to derail Mr Prayuth’s plans, but many voters stayed at home.

Thailand’s powerful king, Maha Vajiralongkorn, issued a statement on the eve of the election saying the role of leaders is to stop “bad people” from gaining power and causing chaos. It was also broadcast on Thai television stations minutes before voting started.

Invoking a speech by his father, the previous Thai king who died in 2016 after reigning for seven decades, King Vajiralongkorn said not all citizens can be transformed into good people, so leaders must be given support in ruling to create a peaceful nation.

He urged government officials, soldiers and civil servants to look after national security.

It was the monarch’s second notable intervention in politics recently. Last month, he demanded his sister Princess Ubolratana Mahidol withdraw as a prime ministerial candidate for a small Thaksin-allied party within 24 hours of her announcement.

Support free-thinking journalism and attend Independent events

When it seized power in 2014, the military said it was to end political unrest that had periodically turned violent and disrupted daily life and the economy.

The claim has been a selling point for Mr Prayuth, who according to critics has overseen a period of growing inequality and economic hardship in Thailand.

After the coup, political party gatherings were banned and pro-democracy activists and other dissenters were regularly arrested, interrogated and imprisoned. Just days before Sunday’s election, Pheu Thai said the houses of party officials and its campaign canvassers in some provinces had been searched by military personnel in an act of intimidation.