In 1678, Laksamana Tun Abdul Jamil persuaded his nephew Sultan Ibrahim Shah to flee from Pahang to the relative safety of Riau. Laksamana Tun Abdul Jamil then returned to Johor Lama from Siak and killed the Temenggong. In 1679 however, Laksamana Tun Abdul Jalil paid Bugis mercenaries to fight alongside Johor against Jambi.