Thailand's Constitutional Court on Friday ruled Prime Minister Prayut Chan-ocha has not exceeded the maximum eight years allowed in office, paving the way for his return from a five-week suspension.

The court announced its decision in a case filed by the opposition Pheu Thai party, which had sought clarity on whether Prayut's time as leader of a junta formed after a coup he led eight years ago should count in his overall tally.

"The accused... has been in the prime minister position not exceeding the limit stipulated by the constitution," a judge said in a 25-minute televised reading of the verdict.