In 1678, Laksamana Tun Abdul Jamil persuaded Ibrahim Shah to move the capital of the empire to Riau in order to effectively suppress Jambi forces, who years earlier successfully sacked the old capital of Batu Sawar. Jambi was finally subdued in 1679. In 1681, Johor forces assisted Jambi, now its vassal, in defeating Palembang and its Bugis allies.[1]