Yang di-Pertuan Agong
The Deputy Yang di-Pertuan Agong is elected by the same process immediately after the Yang di-Pertuan Agong. The office is usually (but not always) held by the ruler next in line after the Yang di-Pertuan Agong. The Deputy Yang di-Pertuan Agong exercises the functions of the head of state during the Yang di-Pertuan Agong's absence, or inability to exercise his functions due to illness or infirmity (similar to a regent in other countries).