Lithium is the most effective treatment for bipolar disorder, resulting in strong suicide prevention effects. The therapeutic range of lithium, however, is narrow and treatment initiation requires individual titration to address inter-individual variability. We aimed to improve lithium dose prediction using clinical and genomic data. We performed a population pharmacokinetic study followed by a genome-wide association study (GWAS), including two clinical Swedish cohorts. Participants in cohort 1 were from specialised outpatient clinics at Huddinge Hospital, in Stockholm, Sweden, and participants in cohort 2 were identified using the Swedish National Quality Registry for Bipolar disorder (BipoläR). Patients who received a lithium dose corresponding to at least one tablet of lithium sulphate (6 mmol) per day and had clinically relevant plasma concentrations of lithium were included in the study. Data on age, sex, bodyweight, height, creatinine concentration, estimated glomerular filtration rate (eGFR), lithium preparation, number of tablets of lithium per day, serum lithium concentration, and medications affecting kidney function (C09 antihypertensives, C03 [except C03D] sodium-retaining diuretics, and non-steroidal anti-inflammatory drugs) were obtained retrospectively for several timepoints when possible from electronic health records, BipoläR, and the Swedish prescription registry. The median time between timepoints was 1·07 years for cohort 1 and 1·09 years for cohort 2. The primary outcome of interest was the natural logarithm of total body clearance for lithium (CLLi) associated with the clinical variables. The residual effects after accounting for age and sex, representing the individual-level effects (CLLi,age/sex), were used as the dependent variable in a GWAS. 2357 patients who were administered lithium (1423 women [60·4%] and 934 men [39·6%]; mean age 53·6 years [range 17-89], mainly of European descent) were included and 5627 data points were obtained. Age (variance explained [R2]: R2cohort1=0·41 and R2cohort2=0·31; both p<0·0001), sex (R2cohort1=0·0063 [p=0·045] and R2cohort2=0·026 [p<0·0001]), eGFR (R2cohort1=0·38 and R2cohort2=0·20; both p<0·0001), comedication with diuretics (R2cohort1=0·0058 [p=0·014] and R2cohort2=0·0026 [p<0·0001]), and agents acting on the renin-aldosterone-angiotensin system (R2cohort1=0·028 and R2cohort2=0·015; both p<0·0001) were clinical predictors of CLLi. Notably, an association between CLLi and serum lithium was observed, with a lower CLLi being associated with higher serum lithium (R2cohort1=0·13 and R2cohort2=0·15; both p<0·0001). In a GWAS of CLLi,age/sex, one locus was associated with a change in CLLi (rs583503; β=-0·053 [95% CI -0·071 to -0·034]; p<0·00000005). We also found enrichment of the associations with genes expressed in the medulla (p=0·0014, corrected FDR=0·04) and cortex of the kidney (p=0·0015, corrected FDR=0·04), as well as associations with polygenic risk scores for eGFR (p value threshold: 0·05, p=0·01), body-mass index (p value threshold: 0·05, p=0·00025), and blood urea nitrogen (p value threshold: 0·001, p=0·00043). The model based on six clinical predictors explained 61·4% of the variance in CLLi in cohort 1 and 49·8% in cohort 2. Adding genetic markers did not lead to major improvement of the models: within the subsample of genotyped individuals, the variance explained only increased from 59·32% to 59·36% in cohort 1 and from 49·21% to 50·03% in cohort 2 when including rs583503 and the four first principal components. Our model predictors could be used clinically to better guide lithium dosage, shortening the time to reach therapeutic concentrations, thus improving care. Identification of the first genomic locus and PRS to be associated with CLLi introduces the opportunity of individualised medicine in lithium treatment. Stanley Medical Research Institute, Swedish Research Council, Swedish Foundation for Strategic Research, Swedish Brain Foundation, Swedish Research Council, Söderström-Königska Foundation, Bror Gadelius Minnesfond, Swedish Mental Health Fund, Karolinska Institutet and Hospital.