A top court in Thailand cleared former prime minister hopeful Pita Limjaroenrat of allegations that he had violated election rules by owning shares in a media firm, a case cited by his opponents to block his bid for the country’s top job last year.

The Constitutional Court ruled that Pita’s shareholding in ITV PCL didn’t violate rules as the company wasn’t considered a media firm since 2007, and had not derived any revenue from such operations. Pita, who was suspended as a member of the House of Representatives in July after the court accepted the allegations by the Election Commission, will have his lawmaker status restored immediately.

The poll agency had brought the case against Pita after his reformist Move Forward party won the most seats in the general election held in May and he was chosen as the prime ministerial candidate of a pro-democracy coalition.