Following the sack of Johor capital in Batu Sawar by Jambi forces in 1673, Abdul Jalil Shah III fled to Pahang and established his administration centre in Kuala Pahang before he died in 1676. The year before, Raja Bajau had died and leaving behind a son, Raja Ibrahim who later succeeded as the next Sultan of Johor-Pahang in 1676.[citation needed]