Few studies have explored the effect of acute pain on attentional networks and on the default mode network. Moreover, these studies convey conflicting results, seemingly caused by design. To reassess this issue, we studied 20 healthy subjects with functional magnetic resonance imaging while delivering painful electric shocks. The design was purposely constructed to separate rest, anticipation, and pain perception. We found that default mode network activity in response to pain was biphasic. It deactivated during anticipation when the dorsal attentional network was activated. During pain perception, the default mode network was activated, as were attentional networks. The left posterior fusiform gyrus showed the same dynamics as the default mode network, and its activity was negatively correlated to the subject's pain intensity rating. The associative pregenual anterior cingulate cortex seemed to play a key role in these coactivations. These results concur with data from the literature showing that enhanced pain perception results in greater default mode network activity and that the anticorrelation between the default mode network and the dorsal attentional network disappears in chronic pain patients. Hum Brain Mapp 34:2228–2243, 2013. © 2012 Wiley Periodicals, Inc.