The 17th century Bustan al Salatin records that Muhammad was succeeded by his elder brother Raja Ahmad who took the title Sultan Ahmad Shah. He married a daughter of Tun Hamzah and by her he had a son Raja Mansur. The new ruler was a disgruntled man, he had been passed over for the succession to the Melaka throne twice, first by his younger brother Muhammad, and second by a younger half-brother Raja Hussain, who with the title Sultan Alauddin, succeeded his father Sultan Mansur in 1477.