Prior to Dutch colonization, most of the modern-day province of Riau Islands is part of the Riau-Lingga Sultanate. The sultanate was headed by a Sultan.The Sultan, who was a Malay, acted as Head of State while the "Dipertuan Muda/Yamtuan Muda" (deputy ruler or Viceroy), a position held by the Bugis ruling elite, served as the Head of Government. The sultan's royal palace was located in Penyengat Inderasakti, while the "Yang Dipertuan Muda" resided in Daik, Lingga. After becoming a Dutch protectorate, a Dutch resident was installed as an adviser to the sultan. For the hereditary position of the Sultan, the sultan was fully subjected under the influence of the Dutch East Indies authority. Albeit he is de jure on the apex of the monarchy system, he is under the direct control of the Dutch Resident in Tanjung Pinang. All matters pertaining the administration of the sultanate including the appointment of the Sultan and the "Yang Dipertuan Muda," must be made within the knowledge and even the consent of the Dutch Resident.