Known as Raja Muhammad before his accession, he is the second son of the sixth Sultan of Melaka, Mansur Shah by his wife Putri Wanang Sri Lela Wangsa, daughter of Maharaja Dewa Sura, ruler of Pahang and a relative of the King of Ligor. Both his mother and grandfather were captured and presented to the Sultan of Melaka after the conquest of Pahang.[citation needed]