 It remained occupied during the Muslim period and was used as a fort by the Muslims until the Hafsid period when it was taken by the Crusaders with its inhabitants massacred during the Eighth Crusade.The Hafsids decided to destroy its defenses so it could not be used as a base by a hostile power again.It also continued to function as an episcopal see.