Sultan Abdullah made a pact with the Dutch to attack the Portuguese in Melaka and retake the city, putting it under Malay rule.
Laksamana Tun Abdul Jamil was chosen to lead the 1606 Johor expeditionary force against the Portuguese garrison in Melaka.
The Johor force consisted of 40 war perahus and 1,500 warriors, again led by Laksamana Tun Abdul Jamil.
In 1678, Laksamana Tun Abdul Jamil persuaded his nephew Sultan Ibrahim Shah to flee from Pahang to the relative safety of Riau.
In 1679 however, Laksamana Tun Abdul Jalil paid Bugis mercenaries to fight alongside Johor against Jambi.
Tun Abdul Jamil was the de facto ruler when Sultan Mahmud Shah II of Johor ascended to the throne in 1685.
Bendahara Tun Habib Abdul Majid reclaimed Bendaharaship and led nobles and subjects in an uprising.