Anxiety is associated with an attentional bias toward threat, yet the underlying mechanisms of this bias remain to be explored. Based on the assumption that anxiety selectively increases the strength of stimulus-driven attention to threat, we hypothesize that threatening stimuli and anxiety interactively impair the ability to re-allocate attention based on internal goals. We tested this assumption in a task-switching experiment with N=29 participants. Compared to task repetition, task switching requires goal-directed attention in order to reconfigure the task set. Both emotionally neutral and threatening stimuli were presented, and dispositional anxiety was measured using the STAI questionnaire. Results showed an interaction of anxiety and emotional quality of pre-switch stimuli on switch cost, independent of the emotional quality of the currently presented stimulus: switch cost was larger for more anxious participants, but only when the task switch was preceded by a threatening stimulus.