In the elderly, cigarette smoking has been related to reduced cognitive performance and moderate alcohol consumption to increased cognitive performance. It is not clear whether these associations also exist in middle age. The authors examined these relations in a population-based cohort study of 1,927 randomly selected, predominantly middle-aged subjects aged 45-70 years at the time of cognitive testing and living in the Netherlands. From 1995 until 2000, an extensive cognitive battery was administered, and compound scores were calculated. Risk factors had been assessed approximately 5 years previously. Multiple linear regression analyses (in which one unit of the cognitive score = one standard deviation) showed that, after the authors adjusted for age, sex, education, alcohol consumption, and cardiovascular risk factors, current smokers had reduced psychomotor speed (beta = -0.159, 95% confidence interval: -0.071, -0.244; p = 0.0003) and reduced cognitive flexibility (beta = -0.133, 95% confidence interval: -0.035,-0.230; p = 0.008) compared with never smokers. This effect was similar to that of being approximately 4 years older. Alcohol consumption was related to increased speed and better flexibility, especially among women who drank 1-4 alcoholic beverages a day. In conclusion, among middle-aged subjects, current smoking was inversely and alcohol consumption positively related to psychomotor speed and cognitive flexibility. This finding suggests that actions to prevent cognitive decline can be taken in middle age.