Seaside fortress was a final stronghold of early Islamic power