Text messaging while driving can be distracting and significantly increases the risk of being involved in a collision. Compared to freeway driving, driving in a tunnel environment introduces factors that may interact with driver attentional resources to exacerbate the effects of distraction on driving safety. With planning and design of the 18km Stockholm Bypass tunnel ongoing, and because of the potentially devastating consequences of crashes in long tunnels, it is critical to assess the effects of driver distraction in a tunnel environment. Twenty-four participants (25-50 years) drove in simulated highway and tunnel road environments while reading and writing text messages using their own mobile phones. As expected, compared to driving alone, text messaging was associated with decrements in driving performance and visual scanning behavior, and increases in subjective workload. Speeds were slower compared to baseline (no text-messaging) driving when participants performed the text-messaging tasks in the tunnel environment compared to the freeway, suggesting that drivers may have attempted to compensate more for the increased text-messaging-related workload when they were in the tunnel. On the other hand, increases in lane deviation associated with the most complex text-messaging task were more pronounced in the tunnel compared to on the freeway. Collectively, results imply that driver distraction in tunnels is associated with generally similar driving decrements as freeway driving; however, the potential consequences of these decrements in tunnels remain significantly more serious. Future research should attempt to elucidate the nature of any differential compensatory behavior in tunnel, compared to freeway, driving. In the meantime, drivers should be advised to refrain from text messaging, especially when driving in tunnels.