Thailand's opposition "democratic front" of seven parties on Wednesday said it had won a majority in the lower house of parliament after a messy election, and had the right to try to form a government after five years of military rule.

But the opposition alliance would still be unable to elect a prime minister, as parliamentary rules, written by the ruling military junta, require backing from a majority of upper and lower houses combined.

Parliament's upper house, entirely appointed by the junta, is expected to endorse the pro-military party.