Based on "Salasilah Raja-Raja Perak" (Perak Royal Genealogy), the Perak Sultanate was formed in the early 16th century on the banks of the Perak River by the eldest son of Mahmud Shah, the 8th Sultan of Malacca. He ascended to the throne as Muzaffar Shah I, first sultan of Perak, after surviving the capture of Malacca by the Portuguese in 1511 and living quietly for a period in Siak on the island of Sumatra. He became sultan through the efforts of Tun Saban, a local leader and trader between Perak and Klang. There had been no sultan in Perak when Tun Saban first arrived in the area from Kampar in Sumatra. Most of the area's residents were traders from Malacca, Selangor and Sumatra.