INTRODUCTION AND AIM: The association between thyroid dysfunction and mortality is controversial. Moreover, the impact of duration of thyroid dysfunction is unclarified. Our aim was to investigate the correlation between biochemically assessed thyroid function as well as dysfunction duration and mortality. METHODS: Register-based follow-up study of 239,768 individuals with a serum TSH measurement from hospitals and/or general practice in Funen, Denmark. Measurements were performed at a single laboratory from January 1st 1995 to January 1st 2011. Cox regression was used for mortality analyses and Charlson Comorbidity Index (CCI) was used as comorbidity score. RESULTS: Hazard ratios (HR) with 95% confidence intervals (CI) for mortality with decreased (<0.3 mIU/L) or elevated (>4.0 mIU/L) levels of TSH were 2.22; 2.14-2.30; P<0.0001 and 1.28; 1.22-1.35; P<0.0001, respectively. Adjusting for age, gender, CCI and diagnostic setting attenuated the risk estimates (HR 1.23; 95% CI: 1.19-1.28; P<0.0001, mean follow-up time 7.7 years, and HR 1.07; 95% CI: 1.02-1.13; P = 0.004, mean follow-up time 7.2 years) for decreased and elevated values of TSH, respectively. Mortality risk increased by a factor 1.09; 95% CI: 1.08-1.10; P<0.0001 or by a factor 1.03; 95% CI: 1.02-1.04; P<0.0001 for each six months a patient suffered from decreased or elevated TSH, respectively. Subdividing according to degree of thyroid dysfunction, overt hyperthyroidism (HRovert 1.12; 95% CI: 1.06-1.19; P<0.0001), subclinical hyperthyroidism (HRsubclinical 1.09; 95% CI: 1.02-1.17; P = 0.02) and overt hypothyroidism (HRovert 1.57; 95% CI: 1.34-1.83; P<0.0001), but not subclinical hypothyroidism (HRsubclinical 1.03; 95% CI: 0.97-1.09; P = 0.4) were associated with increased mortality. CONCLUSIONS AND RELEVANCE: In a large-scale, population-based cohort with long-term follow-up (median 7.4 years), overt and subclinical hyperthyroidism and overt but not subclinical hypothyroidism were associated with increased mortality. Excess mortality with increasing duration of decreased or elevated serum TSH suggests the importance of timely intervention in individuals with thyroid dysfunction.