Mahmud Shah of Malacca
Sultan Mahmud Shah ibni Almarhum Sultan Alauddin Riayat Shah (died 1528) ruled the Sultanate of Malacca from 1488 to 1511, and again as pretender to the throne from 1513 to 1528. Life. His father was Sultan Alauddin Riayat Shah. Upon his father's premature death, he was installed at a very young age. The regent at that time was the prime minister ("bendahara" in Malay) Tun Perak. During his initial years as a young adult, the sultan was known to be a ruthless monarch. The administration of the sultanate was in the hands of an able  and wise Tun Perak. After the death of Tun Perak in 1498, he was succeeded by a new Prime Minister (Bendahara) Tun Mutahir. The death of Tun Perak changed Sultan Mahmud into a more responsible ruler, although his rule was turbulent in his twilight years. The factors included that the sultan's administration became ineffective and weak, and that Tun Mutahir took bribes and anointed ministers on a whim. This also caused factions amongst the ministers, in which led to Sultan Mahmud executing Tun Mutahir and his entire family due to a certain faction's deception. Apart from that, the  struggle for power between the ministers ultimately disrupted the unity and peace of the various races of the population. The defenses of the Sultanate too deteriorated by the early 16th century due to its army largely consisting of mercenaries who were disloyal to the Sultan. During Portuguese admiral Diogo Lopes de Sequeira's visit to Malacca from 1509–1510, the sultan planned to assassinate him. However, Sequeira learned of this plot and fled Malacca after losing a few followers to the Sultan's guards. When the famous Portuguese naval officer Afonso de Albuquerque received word, he decided to utilize this to  embark upon his expeditions of conquest in Asia. Malacca was then subsequently attacked by the Portuguese in the Capture of Malacca (1511), during which Mahmud Shah fled across the Malay Peninsula to Pahang on the east coast, where he made a futile effort to enlist Chinese aid. Mahmud Shah then moved south and with his capital on the island of Bintan (now part of Indonesia), southeast of Singapore, he continued to receive the tribute and allegiance from surrounding states that had been rendered him as ruler of Malacca. He became the leader of a Malay and Muslim confederacy and launched  several unsuccessful attacks against Portuguese-occupied Malacca between 1515 to 1519. In 1526, the Portuguese responded to the threat of Mahmud Shah’s forces by destroying his capital at Bintan. Mahmud Shah finally fled to Kampar, Riau, then died two years later in 1528. His son Raja Ali, the future Alauddin Riayat Shah II of Johor went on to found the Johor Sultanate, which became a substantial empire whose power culminated in the 18th and 19th centuries. His other son, Raja Muzaffar was invited by Perak ministers Tun Saban and Nakhoda Kassim to found the Perak Sultanate. He had several  wives. Among the best known was Tun Teja. The sultan was also surrounded by able men and warriors such as Hang Tuah, Khoja Hassan and Hang Nadim. He had three sons; Sultan Ahmad Shah, Muzaffar I of Perak and Alauddin Riayat Shah II of Johor. Ahmad Shah succeeded Mahmud when Mahmud mistakenly killed the Bendahara Tun Mutahir and the Bendahara's family after Raja Mudaliar accused Mutahir of planning a rebellion. Ahmad Shah was deemed incompetent and was killed by Mahmud Shah himself in 1513 after a failed attempt to retake Malacca from the Portuguese. Mahmud Shah then reclaimed the  throne, although by then the Malacca sultanate had been abolished, thus making him a pretender. Muzaffar went north to establish the Sultanate of Perak while Alauddin Riayat went on to found Sultanate of Johor. Sultan Mahmud is associated with the Malay legend of Puteri Gunung Ledang which is about his failed courtship of a fairy princess. Sultan Mahmud is also said to have killed Tun Mutahir and the Bendahara's family members because Mutahir did not give his daughter, Tun Fatimah's hand in marriage to Sultan Mahmud. Tun Fatimah was married to Tun Ali. Mahmud Shah of Malacca Sultan