 Together they planned rebellion against Sultan Ali.Perkasa Alam was put in command of the Pidië troops, but in the end they refused to fight and Perkasa Alam was imprisoned by the sultan.However, when the Portuguese invaded Aceh in 1606 he was let out of prison and distinguished himself in the fight against the "infidels".