Abdul Jalil Shah IV of Johor

Although the bendahara's son, Tun Abdul Jalil, inherited the position and maintained some stability for a time, Johor was thrown into a state of upheaval in 1699, when Mahmud Shah was assassinated by a local chief, Megat Seri Rama, whose pregnant wife was executed on the Sultan's orders.

A deeply religious man, Abdul Jalil Shah IV gradually took less interest in governing his kingdom, devoting more time instead to his faith and to his Acehnese wife Che Nusamah.

[1] Following Abdul Jalil's contentious accession, Minangkabau settlements in Rembau, Sungei Ujong and Naning that existed since the mid-15th century, began to challenge Johor's authority.

[2] Following the victory of Raja Kecil's forces, the deposed Abdul Jalil Shah IV was re-appointed as Bendahara of the kingdom and lived at Kota Tinggi.

Raja Kecil in Riau, Abdul Jalil Shah IV on the east coast of the Malay Peninsula and the Bugis in Selangor and Linggi.

The Bugis eventually came out as victorious, in part because Raja Kecil had sabotaged his own popularity by having Abdul Jalil Shah IV killed in Kuala Pahang.

[2] Abdul Jalil Shah IV was killed while conducting his prayers on board his ship, by an emissary sent by Raja Kecil off Kuala Pahang, on 21 November 1721.