Prior to the coup d'état, the prime minister was nominated by a vote in the Thai House of Representatives by a simple majority, and is then appointed and sworn-in by the king of Thailand. The house's selection is usually based on the fact that either the prime minister is the leader of the largest political party in the lower house or the leader of the largest coalition of parties. In accordance with the constitution, the prime minister can only be appointed twice and is therefore limited to a maximum of two consecutive terms. The post of Prime Minister is currently held by retired general Prayut Chan-o-cha, since the coup d'état on 22 May 2014.