Sultan Husein, the later Sultan Ali, was the second son of Sultan
Alauddin al-Kahar. His elder brother Abdullah fell against the Portuguese in the siege of Melaka in January 1568. This left Sultan Husein the heir to the kingdom. When Alauddin al-Kahar died on 28 September 1571, he succeeded to the throne under the name Sultan Ali Ri'ayat Syah. According to the chronicle
Bustanus Salatin, he was of a mild disposition and friendly towards scholars and other subjects. During his reign an
Arab scholar called Shaykh Nur ad-Din arrived from
Mecca. He belonged to the
Shafi'i school of law and taught metaphysics in Aceh until his death. This may be seen against the important commercial and political relations with the
Ottoman Empire at the time. Another chronicle,
Hikayat Aceh, tells of dissent within the royal family. His envious brothers Sultan Mughal and Sultan Ghori plotted to depose him. Sultan Mughal visited Fansur (
Barus) and got help from two
Batak sorcerers. He then proceeded to the capital Kutaraja (
Banda Aceh) and was friendly received by Sultan Ali. Some time later he let the two Bataks enter the palace compound and perform
black magic, with the result that the sultan fell ill. The other brother Sultan Ghori arrived to Kutaraja but was refused entrance. Now Sultan Mughal made preparations to smuggle his accomplices into the part of the palace where he stayed in order to perform the coup. This came to the ears of Sultan Ali, who in turn resorted to strategy: he brought in atap (leaves to cover houses) where weapons were hidden. Sultan Mughal was attacked and killed in the tumult in spite of orders by the sultan to spare him. Sultan Ali gave orders to kill all the men of Sultan Mughal but withdrew the order at second thought. ==War with the Portuguese==