Background: Cardiovascular risk factors are associated with dementia and cognitive decline. We investigated the effects of renin-angiotensin system blockade on cognitive function in patients aged 55 years and older with established atherosclerotic cardiovascular disease or diabetes with end-organ damage in two clinical trials. Methods: In the main study, ONTARGET, a double-blind, double-dummy, randomised controlled trial, the effects on cardiovascular outcomes of standard doses of an angiotensin-converting enzyme (ACE) inhibitor (ramipril), an angiotensin-receptor blocker (telmisartan), and a combination of the drugs were evaluated in 25 620 participants. In the parallel TRANSCEND trial, the effects of telmisartan were compared with those of placebo in 5926 participants intolerant to ACE inhibitors. Secondary outcomes included cognitive impairment (defined by investigator-reported diagnosis of dementia or significant cognitive dysfunction, or a score of ≤23 on the Mini-Mental State Examination [MMSE]) and cognitive decline (a decrease of ≤3 points on the MMSE from baseline during follow-up). Analyses were by intention to treat. We pooled data from these studies to identify baseline predictors of cognitive impairment and its frequency according to mean systolic blood pressure during follow-up. These studies were registered with ClinicalTrials.gov, number NCT00153101. Findings: During a median duration of 56 months (IQR 51-64) of follow-up in ONTARGET, cognitive impairment occurred in 652 (8%) of 7865 patients allocated ramipril, 584 (7%) of 7797 allocated telmisartan, and 618 (8%) of 7807 allocated combination treatment (combination vs ramipril, odds ratio [OR] 0·95, 95% CI 0·85-1·07, p=0·39; telmisartan vs ramipril, OR 0·90, 0·80-1·01, p=0·06). Corresponding figures for cognitive decline were 1314 (17%), 1279 (17%), and 1240 (17%) in each of the groups, respectively (telmisartan vs ramipril, OR 0·97, 0·89-1·06, p=0·53; combination vs ramipril, OR 0·95, 0·88-1·04, p=0·28). In TRANSCEND, cognitive impairment occurred in 239 (9%) of 2694 participants allocated telmisartan compared with 245 (9%) of 2689 allocated placebo (OR 0·97, 0·81-1·17, p=0·76). The corresponding figures for cognitive decline were 454 (17%) and 412 (16%; OR 1·10, 0·95-1·27, p=0·22). Interpretation: In patients with cardiovascular disease or diabetes, different approaches to blocking of the renin-angiotensin system had no clear effects on cognitive outcomes. Although patients with the lowest systolic blood pressure had the greatest preservation of cognitive function, meta-regression analyses did not show any benefits of blood-pressure lowering on cognition over several years of treatment. Funding: Boehringer-Ingelheim.