Thailand's poll body certified the results of last month's election on Monday, paving the way for the first session of parliament in the next few weeks ahead of the formation of a new government.

The election commission said it had endorsed the winners of all 500 seats of the lower house, which must convene within 15 days to elect a speaker, who will then call for a joint session of the bicameral legislature to vote on a prime minister.

The progressive Move Forward party pulled off a stunning victory in the May 14 ballot, closely followed by the populist Pheu Thai party, as the opposition thrashed rivals allied with the royalist military after nine years of government led or backed by the army.

The opposition has formed an eight-party alliance that is expected to back Move Forward's Harvard-educated leader Pita Limjaroenrat for prime minister and form a coalition government likely next month.

Though endorsement of the results clears up some of the uncertainty in the election aftermath in Thailand, it is far from clear whether Pita can muster enough support to become premier, which requires 376 votes from the combined upper and lower houses.

The alliance has control of 312 seats and will need to court votes from either rival parties or some of the 250 members of a conservative-leaning Senate, who were appointed under military rule after a 2014 coup.

The Move Forward victory included a near clean sweep of the capital Bangkok, riding on massive youth support for an anti-establishment platform that has put it on a collision course with conservatives, generals and an old-money business elite that have long controlled Thai politics.

Move Forward's alliance said it would meet on Thursday to agree on a speaker and deputy speakers.

Pita also has an election commission examination hanging over his bid for the top job, centred on whether he held shares in a media firm, which is prohibited under Thai law, and ran for office while knowingly unqualified.

He maintains the firm in question, iTV, is not an active media entity. If found guilty by a court, Pita faces a political ban of up to 20 years and even prison.

(Reporting Chayut Setboonsarng, Panarat Thepgumpanat and Panu Wongcha-um; Editing by Martin Petty)