general elections, the Pakatan Harapan coalition defeated the BN at the federal level for the first time in history. State level At the state level, voters elect representatives to the Dewan Undangan Negeri (State Legislative Assembly). The number of representatives varies between the different states, with as many as 82 electorates in Sarawak and as little as 15 in Perlis. Members are elected from single-member constituencies drawn based on population using the first-past-the-post system. The party that forms the majority of the state assembly will form the state government. State assembly constituencies are smaller in area and population than the parliamentary constituencies. Each parliamentary constituency outside of the federal territories is subdivided into a number of state assembly constituencies, usually two or three but can be as many as six. Traditionally, state elections are held simultaneously with the parliamentary election but each state can decide when to hold its election. This is because state assemblies are dissolved by their respective Ruler or governor on the advice of the chief minister of the state. For example, following the 1977 Kelantan Emergency, a snap election was called in Kelantan in March 1978, months ahead of the general election in July 1978. A more recent example is that in the 1999 general election, the state elections of the 11 states on Peninsular Malaysia were held simultaneously with the parliamentary election, while Sabah already had its state election months earlier and the Sarawak state assembly was not due for election until 2001. In the 2004 and 2008 general elections, the state election of Sabah were held simultaneously with the parliamentary election as well, but Sarawak held its state election in 2006 and 2011. The practice of holding simultaneous elections was disrupted following the 2018 elections and the 2020–2022 Malaysian political crisis. Early state elections took place in Sabah (2020), Malacca (2021) and Johor (2022). Sarawak held its delayed state election in December 2021. When the 14th Parliament was dissolved on 10 October 2022 to make way for the 15th general election, six out of nine states with elections due in 2023 opted not to dissolve their state assemblies at the same time, leaving only three states (Pahang, Perak and Perlis) holding state elections concurrently with the parliamentary election. Before the 2008 elections, the Barisan Nasional and its predecessor the Alliance controlled most of the state assemblies in every election, while occasionally losing some states,