BANGKOK — A Thai court on Wednesday ordered Prime Minister Yingluck Shinawatra removed from office, a highly divisive move and a victory for a powerful opposition movement that for six months has sought to overthrow the government.

The Constitutional Court ruled that Ms. Yingluck abused her power when she transferred a civil servant to another post more than three years ago. The court ordered her to step down immediately along with all members of her cabinet who were in office at the time of the transfer.

Ms. Yingluck’s party called the decision a “new form of coup d’état.”

Leaders of Ms. Yingluck’s party quickly announced that a deputy prime minister, Niwattumrong Boonsongpaisan, would become acting prime minister.

It was the third time since 2006 that a prime minister representing the political movement founded by Ms. Yingluck’s brother Thaksin Shinawatra has been removed by court order. The movement, which has its power base in the provinces, has won every election since 2001 but has antagonized the Bangkok establishment, a struggle that is at the heart of Thailand’s eight years of political crisis.