Thailand’s Constitutional Court dismissed Prime Minister Srettha Thavisin from office on Wednesday, throwing the country into fresh turmoil and creating deeper uncertainty about the political future of Southeast Asia’s second-largest economy.

Mr. Srettha, who took office just over a year ago, was accused of violating moral and ethical standards set out in the constitution because he appointed an ally of his benefactor, Thaksin Shinawatra, to his cabinet.

Many Thais saw Mr. Srettha as a figurehead prime minister, with Mr. Thaksin playing a powerful behind-the-scenes role. Wednesday’s ruling served as a warning to the ambitions of Mr. Thaksin, himself a former prime minister and long a foil to Thailand’s royalist-military establishment.

Mr. Srettha’s removal is likely to increase the disillusionment of many Thais, who already see the case as the latest proof of intervention by an unelected establishment that is quashing the people’s will. Last week, the same court ordered the disbandment of the Move Forward Party, a progressive party that won last year’s election but was blocked from forming a government.

The Constitutional Court made the ruling on Wednesday afternoon in a 5-4 decision.

This is a developing story.