Thailand's Constitutional Court on Wednesday cleared thwarted prime ministerial candidate Pita Limjaroenrat in a case that could have seen him banned from politics, reinstating him as an MP.

The 43-year-old led the progressive Move Forward Party (MFP) to win the most votes in last year's general election, but was blocked from becoming prime minister after he was suspended as an MP in July.

His party was excluded from the governing coalition after the powerful establishment was spooked by the MFP's calls to reform the kingdom's strict royal insult laws, the military and business monopolies.

The Constitutional Court on Wednesday ruled by eight votes to one that Pita had not broken rules banning members of parliament from owning shares in media companies.

The case revolved around shares in the long-defunct ITV television station, which Pita says he inherited from his father when he died.

"ITV was not operating as media company on the day the party submitted the respondent's name for election," judge Punya Udchachon said in reading the court's verdict in the case.

"Holding the shares did not violate the law. The court has ruled his MP status has not ended."

There were jubilant scenes outside the court as dozens of MFP supporters wearing the party's orange colours cheered and chanted "PM Pita".

As he arrived for the hearing earlier, Pita said he was confident of the outcome and thanked MFP supporters.

"No matter the result I will still be working for the people," he said.

"It's only a detour. Regardless of the verdict we will continue fighting."

Even before the ruling, the media-savvy politician insisted he would run for office again -- but if the court had ruled against him, he would have faced disqualification from parliament altogether.

He reiterated in an interview with AFP late last year that he would take another tilt at the premiership, saying he was "not giving up".

Establishment fightback 

Pita's case bore similarities to a 2019 case, when popular progressive Thai politician Thanathorn Juangroongruangkit was disqualified as an MP for holding media shares.

Thanathorn's Future Forward party, the predecessor of the MFP, was later dissolved by the courts in a separate case which led to massive pro-democracy demonstrations.

During the 2023 election campaign, Pita re-energised young and urban Thais exhausted after the dwindling protest movement and weary of a near-decade of military rule.

Mostly written off by commentators, MFP surprised the establishment when they beat the Pheu Thai party of veteran political playmaker and former premier Thaksin Shinawatra into second place in May.

MFP's pledges to reform Thailand's strict royal insult laws, as well as plans to break up business monopolies and take on the military's influence in politics, spurred the kingdom's elites into action behind the scenes.

Pita was blocked by senators -- appointed by the last junta -- from becoming prime minister, and Pheu Thai formed a coalition that included pro-military parties but shut MFP out of government.

Educated in Thailand and at Harvard, the former Grab executive was drawn into politics in 2018 when he joined Future Forward. He stepped down as MFP leader in September.

Another challenge looms for his former party next week when the Constitutional Court will consider a petition arguing that the MFP's pledge to reform lese-majeste laws amounted to an attempt to overthrow the democratic government with the king as a head of state.