Previously while the states of Penang, Malacca and Sarawak had Governors or Yang di-Pertua Negeri, the state of Sabah (until 1976) had a Yang di-Pertua Negara while the state of Singapore (between 1959 and 1965) had a Yang di-Pertuan Negara. In present day usage negeri and negara mean "state (sub-national)" and "state (country)" respectively, while the finer distinction between Yang di-Pertua and Yang di-Pertuan is similar to the English "head" and "ruler".
The Yang di-Pertuan Negara of Head of State of Singapore replaced the British colonial Governor under the constitution of 1959 which granted Singapore limited self-government. This title was retained when Singapore became a state of Malaysia in 1963, but was replaced by the title of President when Singapore became an independent Republic in 1965.
The Sultan of Brunei is Yang di-Pertuan Negara or Head of State of Brunei.
See also Yang di-Pertuan Agong