Thailand's Constitutional Court has ruled that the maverick leader of a new political party that finished third in a general election in March violated election laws and cannot keep his seat in Parliament.

The court ruled Wednesday that Thanathorn Juangroongruangkit, leader of the Future Forward Party, violated a regulation barring owners of media companies from running for Parliament.

The court rejected Thanathorn’s claim that he sold his holding in a media production company before the deadline needed to be a candidate.

Thanathorn Juangroongruangkit, center, leader of the anti-military Future Forward Party is surrounded by his supporters on his arrival at Constitutional Court in Bangkok, Thailand, Wednesday, Nov. 20, 2019.  Thanathorn is expected to receive a verdict whether he is eligible to remain as a member of the parliament due to an accusation of owning media shares a violation of the Thai constitution. (AP PhotoGemunu Amarasinghe)

Thanathorn Juangroongruangkit, center, leader of the anti-military Future Forward Party is surrounded by his supporters on his arrival at Constitutional Court in Bangkok, Thailand, Wednesday, Nov. 20, 2019. Thanathorn is expected to receive a verdict whether he is eligible to remain as a member of the parliament due to an accusation of owning media shares a violation of the Thai constitution. (AP PhotoGemunu Amarasinghe)

The ruling had been expected. Thanathorn’s party has been a thorn in the side of Thailand’s conservative establishment, in whose favor the courts have consistently ruled. The party is disliked not only for its anti-military stance, but also because of its strong popularity.

Thanathorn Juangroongruangkit, center, leader of the anti-military Future Forward Party is surrounded by his supporters as he arrives at Constitutional Court in Bangkok, Thailand, Wednesday, Nov. 20, 2019.  Thanathorn is expected to receive a verdict whether he is eligible to remain as a member of the parliament due to an accusation of owning media shares a violation of the Thai constitution. (AP PhotoGemunu Amarasinghe)

Thanathorn Juangroongruangkit, center, leader of the anti-military Future Forward Party is surrounded by his supporters as he arrives at Constitutional Court in Bangkok, Thailand, Wednesday, Nov. 20, 2019. Thanathorn is expected to receive a verdict whether he is eligible to remain as a member of the parliament due to an accusation of owning media shares a violation of the Thai constitution. (AP PhotoGemunu Amarasinghe)

Thanathorn Juangroongruangkit, center, leader of the anti-military Future Forward Party gestures as he arrive at Constitutional Court in Bangkok, Thailand, Wednesday, Nov. 20, 2019. Thanathorn is expected to receive a verdict whether he is eligible to remain as a member of the parliament due to an accusation of owning media shares a violation of the Thai constitution. (AP PhotoGemunu Amarasinghe)

Thanathorn Juangroongruangkit, center, leader of the anti-military Future Forward Party gestures as he arrive at Constitutional Court in Bangkok, Thailand, Wednesday, Nov. 20, 2019. Thanathorn is expected to receive a verdict whether he is eligible to remain as a member of the parliament due to an accusation of owning media shares a violation of the Thai constitution. (AP PhotoGemunu Amarasinghe)