Frailty is a common geriatric syndrome, strongly associated with disability, mortality and hospitalisation. The mechanisms underlying frailty are multifactorial and not well understood, but a genetic basis has been suggested with heritability estimates between 19 and 45%. Understanding the genetic determinants and biological mechanisms underpinning frailty may help to delay or even prevent frailty. We performed a genome-wide association study (GWAS) of a frailty index (FI) in European descent participants from UK Biobank (n=164,610, aged 60-70 years). FI calculation was based on 49 self-reported items on symptoms, disabilities and diagnosed diseases. We identified 26 independent genetic signals at 24 loci associated with the FI (p<5*10-8). Many of these loci have previously been associated with traits such as body mass index, cardiovascular disease, smoking, HLA proteins, depression and neuroticism; however, three appear to be novel. The estimated single nucleotide polymorphism (SNP) heritability of the FI was 14% (0.14, SE 0.006). A genetic risk score for the FI, derived solely from the UK Biobank data, was significantly associated with FI in the Swedish TwinGene study (n=10,616, beta: 0.11, 95% CI: 0.02-0.20, p=0.015). In pathway analysis, genes associated with synapse function were significantly enriched (p<3*10-6). We also used Mendelian randomization to identify modifiable traits and exposures that may affect the risk of frailty, with a higher educational attainment genetic risk score being associated with a lower risk of frailty. Risk of frailty is influenced by many genetic factors, including well-known disease risk factors and mental health, with particular emphasis on synapse maintenance pathways.