The relationship of education to the experience of anxiety and depression throughout adult life is unclear. Our knowledge of this relationship is limited and inconclusive. The aim of this study was to examine (1) whether higher educational level protects against anxiety and/or depression, (2) whether this protection accumulates or attenuates with age or time, and (3) whether such a relationship appears to be mediated by other variables. In a sample from the Nord-Trøndelag Health Study 1995--1997 (HUNT 2) (N=50,918) of adults, the cross-sectional associations between educational level and symptom levels of anxiety and depression were examined, stratified by age. The long-term effects of educational level on anxiety/depression were studied in a cohort followed up from HUNT 1 (1984--1986) to HUNT 2 (N=33,774). Low educational levels were significantly associated with both anxiety and depression. The coefficients decreased with increasing age, except for the age group 65-74 years. In the longitudinal analysis, however, the protective effect of education accumulated somewhat with time. The discrepancy between these two analyses may be due to a cohort effect in the cross-sectional analysis. Among the mediators, somatic health exerted the strongest influence, followed by health behaviors and socio-demographic factors. Higher educational level seems to have a protective effect against anxiety and depression, which accumulates throughout life.