Abdul Jamil Shah oversaw restoration of ties between Pahang and Melaka and in 1500, the two states cooperated to defeat the Raja of Ligor who had been instructed by Siam to attack Pahang. It was Siam's last attempt at invading Pahang.[1] In 1511, Melaka fell to the Portuguese Empire. Mahmud Shah fled to Muar in Johor and then on to Pahang where he was cordially received by Abdul Jamil Shah.[3] Abdul Jamil Shah died at Pekan a year later and was buried at Ziarat Raja Raden, and thus is styled Marhum Ziarat.[citation needed]