Known as Raja Muzaffar before his accession, he is the youngest son of the first Sultan of Pahang, Muhammad Shah by his wife Mengindra Putri. He married first to his cousin Raja Putri Olah binti al-Marhum Sultan Ahmad, daughter of the second Sultan of Pahang, and second at Bintan circa 1519 to Raja Khadija binti al-Marhum Sultan Mahmud Shah, daughter of the last sultan of Melaka.[citation needed]