 The invasion force was beaten back and withdrew and Perkasa Alam rose in esteem at the court.When Sultan Ali suddenly died on 4 April 1607, Perkasa Alam was able to secure the throne on the same day.He imprisoned his other uncle Husain and later had him killed.