According to the "Malay Annals", the people of Klang overthrew the local chief or "penghulu" and asked the Sultan of Malacca Muzaffar Shah to appoint another, and Tun Perak was then appointed the leader.