OBJECTIVE: To investigate whether treatment with lithium in patients with mania or bipolar disorder is associated with a decreased rate of subsequent dementia. METHODS: Linkage of register data on prescribed lithium in all patients discharged from psychiatric health care service with a diagnosis of mania or bipolar disorder and subsequent diagnoses of dementia in Denmark during a period from 1995 to 2005. RESULTS: A total of 4,856 patients with a diagnosis of a manic or mixed episode or bipolar disorder at their first psychiatric contact were included in the study. Among these patients, 2,449 were exposed to lithium (50.4%), 1,781 to anticonvulsants (36.7%), 4,280 to antidepressants (88.1%), and 3,901 to antipsychotics (80.3%) during the study period. A total of 216 patients received a diagnosis of dementia during follow-up (103.6/10,000 person-years). During the period following the second prescription of lithium, the rate of dementia was decreased compared to the period following the first prescription. In contrast, the rates of dementia during multiple prescription periods with anticonvulsants, antidepressants, or antipsychotics, respectively, were not significantly decreased compared to the rate of dementia during the period with one prescription of these drugs. CONCLUSIONS: Continued treatment with lithium was associated with a reduced rate of dementia in patients with bipolar disorder in contrast to continued treatment with anticonvulsants, antidepressants, or antipsychotics. Methodological reasons for these findings cannot be excluded due to the nonrandomized nature of the data.