Abdul Jalil Shah III of Johor

However, the appointment was not recognised by Sultan Iskandar Muda of Aceh, which later invaded Pahang and forced Raja Bujang to flee to the islands of Lingga.

At the same time, the Acehnese waged war with the new Sultan of Johor, Abdullah Ma'ayat Shah who was also forced to flee to Lingga.

[2][3] Johor later grew stronger and formed an alliance with the Dutch to attack Portuguese Malacca and conquered it on January 14, 1641, ending the triangular war.

He spent two years of his reign in Makam Tauhid before he crossed the Damar river to establish his new capital in Pasir Raja (also known as Batu Sawar) in October 1642.

Sultan Abdul Jalil Shah III fled to Pahang and ordered his Laksamana to direct invasions alongside the orang laut against Jambi from his base in Riau, restoring Johor's status.