Sudden cardiac death is responsible for half of all deaths from cardiovascular disease. The analysis of the electrophysiological substrate for arrhythmias is crucial for optimal risk stratification. A prolonged T-peak-to-Tend (Tpe) interval on the electrocardiogram is an independent predictor of increased arrhythmic risk, and Tpe changes with heart rate are even stronger predictors. However, our understanding of the electrophysiological mechanisms supporting these risk factors is limited. We conducted genome-wide association studies (GWASs) for resting Tpe and Tpe response to exercise and recovery in $30,000 individuals, followed by replication in independent samples ($42,000 for resting Tpe and $22,000 for Tpe response to exercise and recovery), all from UK Biobank. Fifteen and one single-nucleotide variants for resting Tpe and Tpe response to exercise, respectively, were formally replicated. In a full dataset GWAS, 13 further loci for resting Tpe, 1 for Tpe response to exercise and 1 for Tpe response to exercise were genome-wide significant (p % 5 3 10 À8 ). Sex-specific analyses indicated seven additional loci. In total, we identify 32 loci for resting Tpe, 3 for Tpe response to exercise and 3 for Tpe response to recovery modulating ventricular repolarization, as well as cardiac conduction and contraction. Our findings shed light on the genetic basis of resting Tpe and Tpe response to exercise and recovery, unveiling plausible candidate genes and biological mechanisms underlying ventricular excitability.