Pahang nominally entered into a dynastic union with Johor in 1623, when Johor's Abdullah Ma'ayat Shah died and Raja Bujang emerged as the new ruler of Johor-Pahang, installed as Sultan Abdul Jalil Shah Riayat Shah III. From 1629 to 1635, Pahang, operating independently from Sultan Abdul Jalil III appeared determined to oust the Acehnese, allying itself with the Dutch and Portuguese whenever it was expedient to do so. However, in 1637, the appointment of Iskandar Thani to the throne of Aceh, led to the signing of a peace treaty between Pahang and Aceh at Bulang Island in the Riau-Lingga islands.[50]