Family tree of Malaysian monarchs

The following is family tree of the monarchs of Malaysia. The head of state is titled the Yang di-Pertuan Agong. The position is elective but only the hereditary rulers of the states of Johor, Kedah, Kelantan, Negeri Sembilan, Pahang, Perak, Perlis, Selangor and Terengganu are eligible. He holds office for five years and enjoys the style of Majesty.