With more than 90% of ballots counted, the Palang Pracha Rath Party has gained 7.6 million votes – half a million more than opposition Pheu Thai (For Thais).
Pheu Thai is linked to former PM Thaksin Shinawatra, whose loyalists have won every election since 2001.
The announcement of official results has been postponed until Monday.
However it is now looking more likely that the pro-military party will be in a position to form a government under the current leader, General Prayuth Chan-ocha, who led the coup that ousted Mr Thaksin’s sister Yingluck Shinawatra in 2014.
The preliminary result is unexpected, with the Palang Pracha Rath Party (PPRP) initially predicted by many to come third.
More than 50 million people were eligible to vote, but turnout was reportedly just 64%, AFP news agency reported.
Thailand has been buffeted by political instability for years. After seizing power, the army promised to restore order and democracy, but has repeatedly postponed the vote.
On the eve of the election, Thailand’s King Maha Vajiralongkorn issued a statement urging “peace and order” during the voting process.
The statement, which was featured on national television on Saturday evening, urged voters to “support the good people”.
What is the background?
The election is seen primarily as a contest between pro-military parties and allies of Mr Thaksin.
He was ousted in a coup in 2006 and lives in self-imposed exile to avoid a conviction for abuse of power. But he still has a significant following, largely among rural and less affluent voters.
Gen Prayuth was nominated as the only prime ministerial candidate of the newly formed pro-military PPRP.
Among other prominent parties are the Democrats, led by former prime minister Abhisit Vejjajiva, and the new Future Forward party, led by a young billionaire, Thanatorn Juangroongruangkit.
At the time of the coup, the military said it wanted to restore order and stability and prevent the street protests which have broken out repeatedly over the years.
But the junta has been accused of taking an authoritarian approach to power, strictly controlling the media and arbitrarily using laws like lese majeste – which prohibits any criticism of the military – to silence opponents.
It also introduced a constitution – approved by a referendum – which its critics say was designed to ensure it remained central to Thai politics.
Sunday’s vote was to elect 500 members of the lower house of parliament. But under the constitution, a 250-seat senate has been appointed by the military.
The two houses will together elect a prime minister – a candidate only needs half the votes plus one to win.
So the military’s preferred candidate – Gen Prayuth – would in theory only need 126 lower house votes to take office. The governing party or coalition can also appoint a non-MP as prime minister.
The new constitution also imposes a limit on the number of seats any one party can take, regardless of the number of votes won, and any future government is constitutionally bound to follow the military’s 20-year plan for Thailand.
Preliminary unofficial results will emerge within hours, but correspondents say it will take some time for the future direction of Thailand to become clear, as parties negotiate deals and coalitions.