The system of administration adopted by the sultanate is largely modelled on that Melaka. The Malay Annals narrates that during the installation of Muhammad Shah as the first Sultan in 1470, he was accompanied by Tun Hamzah who was appointed Bendahara ('grand vizier') for the new kingdom, by Seri Akar Raja as his Hulubalang ('chief of the army'), by a Penghulu Bendahari ('chief treasurer'), and a Temenggung ('chief of public security').[52][53] By the time of Sultan Abdul Ghafur, a sophisticated social hierarchy was established, of which the most important were the offices of four major hereditary chiefs who were granted their respective fiefs to govern on behalf of the Sultan. The system survived until modern times.[54]