Thai politics has descended into chaos after its first election since a 2014 coup, as two parties claimed the right to govern, the electoral commission refused to announce the official result and concerns were raised over irregular polling data.

Unofficial results from Sunday’s election indicated that the pro-military Phalang Pracharat party outperformed low expectations to win the most votes, while the pro-democracy Pheu Thai party narrowly won the most seats.

“We have the highest vote and following the Thai constitution, whoever has the highest vote will be the one to form government,” said Sontirat Sontijirawong, the secretary general of Phalang Pracharat, which was formed by the junta as a way to hold on to power through the ballot box and secured about 7.9 million votes nationwide.

Pheu Thai, which was ousted from power in 2014 and is allied with the exiled Thai leader Thaksin Shinawatra, fell well short of the landslide victory that its supporters had hoped for. Nevertheless, its leader, Sudarat Keyuraphan, said it would try to form a government because it won the most constituency races.

“As we have said before, the party with the most seats is the one that has received the confidence from the people to set up the government,” Sudarat said.

Thaksin claimed on Monday the military had “manipulated” the results.

“I knew that the junta running Thailand wanted to stay in power, but I cannot believe how far it has gone to manipulate the general election on Sunday,” he wrote in an opinion piece in the New York Times.

With no party winning an outright majority, the scene has been set for both sides to attempt to build coalitions to form a government.

The election was thrown into further disarray after the election commission refused to formally declare the exact number of parliamentary seats each party had won. The commission said it first had to investigate numerous issues and complaints which had arisen in the voting process. Official results are now expected on 9 May.

Several constituencies reported highly irregular polling data, including one district, Nakhon Ratchasima, where the numbers of ballots cast reportedly exceeded the number of registered voters by 839,564. In the Chiang Rai district in the north, the number of spoiled ballots was almost double the number of eligible ballots.

The commission was also dealing with the case of 1,500 overseas votes from New Zealand, which it had failed to collect from customs in time. In a press conference, the deputy secretary general Nat Laosisawakul appeared confused, saying the commission had consulted the “ambassador of Helsinki” about what to do with the votes.

The system was already heavily rigged in favour of the military. The new constitution, drawn up by the military in 2016, gives it the power to appoint all 250 senators, who then get a vote in who becomes prime minister. This means that the military only needed 126 votes in the lower house to bring back the head of the junta, Prayut Chan-ocha, as prime minister.

Thailand's first election in eight years won't be free or fair, say democracy activists Read more

In the end, voter turnout was far lower than expected at just over 65%, which is thought to have hurt the pro-democracy parties. Pheu Thai were also hobbled by the dissolution of Thai Raksa Chart, their sister Thaksin-allied party, which had been a key part of Pheu Thai’s strategy to gain a majority in parliament. Thai Raksa Chart was forced to disband by the election commission after it nominated the King’s older sister, Princess Ubolranata, as prime minister, which was later ruled to be in violation of the constitution.

Concerns were raised on Monday by election observers over the “inconsistent” process of vote counting, echoing earlier concerns by activists and opposition politicians that this election was neither free not fair.

PNet, a group of 2,600 independent volunteer election observers, reported multiple violations in the process of voting and vote counting, and many of the observers were denied access to polling stations.

The PNet spokesperson Chompunut Chalieobun told the Guardian that it was submitting an “urgent request” to meet the election commission to discuss its findings. “There were so many worrying findings and we are trying to verify all of them at the moment,” said Chompunut.

“The preparation and organisation of the polling stations was very inconsistent, the standards varied hugely between the stations,” she added. “And we faced a lot of challenges in this observation, a lot of our volunteers were refused entry to the polling stations and some even just to the polling area, and after polling closed, many were not allowed to watch the vote counting. So there are a lot of concerns for us.”

There are likely to be weeks of backroom negotiations before it is clear who will be forming the new government. A key player in deciding who will be the non-partisan Bhumjaithai party, which gained substantial votes by running on populist policies such as the legalisation of recreational marijuana, and is now being wooed by both the pro-military and pro-democracy factions.

If the pro-military faction does take control of the new parliament, as most consider likely, operating under a democratic system may be a test for Prayut and the military, who are not used to having any political opposition while in power. Under the five years of military rule, critics of the junta were regularly jailed or sent to “re-education camps” and Prayut had article 44 at his disposal, a law that gave him absolute power. There was little to no consultation, transparency or accountability under the junta government.