 In 1825, its last ruler, Sultan Ahmad Najamuddin, was arrested and sent into exile on the island of Banda Neira in the Moluccas.Sultan Muhammad Bahauddin (reigned 1776–1803) had Kuto Besak's palace built.In 1821, the Dutch attack Palembang again and take the city.