In the end even the Sultan was ignored. 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.