Officials warned of unrest after an Islamist party objected to the portrayal of a struggling cleric.