Subjects detected rarely occurring shifts between two simple tone-patterns, in a paradigm that dissociated the effects of rarity from those of pitch, habituation, and attention. Whole-head magnetoencephalography suggested that rare attended pattern-shifts evoked activity first in the superior temporal plane (sTp, peak ∼100 ms), then superior temporal sulcus (sTs, peak ∼130 ms), then posteroventral prefrontal (pvpF, peak ∼230 ms), and anterior temporal cortices (aT, peak ∼370 ms). Activity was more prominent in the right hemisphere. After subtracting the effects of nonshift tones (balanced for pitch and habituation status), weak but consistent differential effects of pattern-shifts began in aT at 90–130 ms, spread to sTs and sTp at ∼130 ms, then pvpF, and finally returned to aT. Cingulate activity resembled prefrontal. Responses to pattern shifts were greatly attenuated when the same stimuli were ignored, suggesting that the initial superior temporal activity reflected an attention-related mismatch negativity. The prefrontal activity at ∼230 ms corresponded in latency and task correlates with simultaneously recorded event-related potential components N2b and P3a; the subsequent temporal activity corresponded to the P3b. These results were confirmed in sensors specific for frontal or temporal cortex, and thus are independent of the inverse method used. Overall, these results suggest that auditory working memory for temporal patterns begins with detection of the pattern change by an interaction of anterior and superior temporal structures, followed by identification of the event and its consequences led by posteroventral prefrontal and cingulate cortices, and finally, definitive encoding of the event in anterior temporal areas. Hum Brain Mapp, 2011. © 2010 Wiley-Liss, Inc.