Known as Raja Mansur before his accession, he is the eldest son of the seventh Sultan, Zainal Abidin Shah by his Royal wife, Raja Putri Dewi, daughter of Mahmud Shah of Melaka. Mansur Shah II married first to Raja Putri Fatima, elder daughter of Alauddin Riayat Shah II by his wife, Raja Puspa Dewi binti Sultan Mahmud Shah ibni al-Marhum Sultan Muhammad Shah. He married secondly after the death of his first wife, to Putri Bakal binti Raja Ahmad, daughter of Raja Ahmad bin Raja Muhammad of Terengganu.[citation needed]