Background: The identification of people at risk of cognitive impairment is essential for improving recruitment in secondary prevention trials of Alzheimer's disease. We aimed to test and qualify a biomarker risk assignment algorithm (BRAA) to identify participants at risk of developing mild cognitive impairment due to Alzheimer's disease within 5 years, and to evaluate the safety and efficacy of low-dose pioglitazone to delay onset of mild cognitive impairment in these at-risk participants. Methods: In this phase 3, multicentre, randomised, double-blind, placebo-controlled, parallel-group study, we enrolled cognitively healthy, community living participants aged 65–83 years from 57 academic affiliated and private research clinics in Australia, Germany, Switzerland, the UK, and the USA. By use of the BRAA, participants were grouped as high risk or low risk. Participants at high risk were randomly assigned 1:1 to receive oral pioglitazone (0·8 mg/day sustained release) or placebo, and all low-risk participants received placebo. Study investigators, site staff, sponsor personnel, and study participants were masked to genotype, risk assignment, and treatment assignment. The planned study duration was the time to accumulate 202 events of mild cognitive impairment due to Alzheimer's disease in White participants who were at high risk (the population on whom the genetic analyses that informed the BRAA development was done). Primary endpoints were time-to-event comparisons between participants at high risk and low risk given placebo (for the BRAA objective), and between participants at high risk given pioglitazone or placebo (for the efficacy objective). The primary analysis included all participants who were randomly assigned, received at least one dose of study drug, and had at least one valid post-baseline visit, with significance set at p=0·01. The safety analysis included all participants who were randomly assigned and received at least one dose of study medication. An efficacy futility analysis was planned for when approximately 33% of the anticipated events occurred in the high-risk, White, non-Hispanic or Latino group. This trial is registered with ClinicalTrials.gov, NCT01931566. Findings: Between Aug 28, 2013, and Dec 21, 2015, we enrolled 3494 participants (3061 at high risk and 433 at low risk). Of those participants, 1545 were randomly assigned to pioglitazone and 1516 to placebo. 1104 participants discontinued treatment (464 assigned to the pioglitazone group, 501 in the placebo high risk group, and 139 in the placebo low risk group). 3399 participants had at least one dose of study drug or placebo and at least one post-baseline follow-up visit, and were included in the efficacy analysis. 3465 participants were included in the safety analysis (1531 assigned to the pioglitazone group, 1507 in the placebo high risk group, and 427 in the placebo low risk group). In the full analysis set, 46 (3·3%) of 1406 participants at high risk given placebo had mild cognitive impairment due to Alzheimer's disease, versus four (1·0%) of 402 participants at low risk given placebo (hazard ratio 3·26, 99% CI 0·85–12·45; p=0·023). 39 (2·7%) of 1430 participants at high risk given pioglitazone had mild cognitive impairment, versus 46 (3·3%) of 1406 participants at high risk given placebo (hazard ratio 0·80, 99% CI 0·45–1·40; p=0·307). In the safety analysis set, seven (0·5%) of 1531 participants at high risk given pioglitazone died versus 21 (1·4%) of 1507 participants at high risk given placebo. There were no other notable differences in adverse events between groups. The study was terminated in January, 2018, after failing to meet the non-futility threshold. Interpretation: Pioglitazone did not delay the onset of mild cognitive impairment. The biomarker algorithm demonstrated a 3 times enrichment of events in the high risk placebo group compared with the low risk placebo group, but did not reach the pre-specified significance threshold. Because we did not complete the study as planned, findings can only be considered exploratory. The conduct of this study could prove useful to future clinical development strategies for Alzheimer's disease prevention studies. Funding: Takeda and Zinfandel.