The ruler or governor appoints and swears in the Menteri Besar, chief ministers and premier, whose executive council (or Cabinet in Sabah and Sarawak) are collectively responsible to the assembly.
In most states within Malaysia, the office was created by the British colonial government in 1948, in tandem with the creation of the Federation of Malaya.
After Malaya gained independence from the United Kingdom in 1957, the office bearer is appointed among the state legislative assembly members by the Sultans.
For four states in Malaysia with governors (namely Penang, Malacca, Sabah and Sarawak), the office of Ketua Menteri and Premier are open to any Malaysian citizen regardless of their religion, ethnicity, and gender.
This is procedurally established by the vote of confidence in the legislative assembly, as suggested by the Ruler (or Governor) of the state who is the appointing authority.