We present a powerful and flexible statistical method for the genetic mapping of complex traits. This method, which we call KnockoffZoom, provably controls the false discovery rate using knockoff genotypes as negative controls, while trying to localize causal variants as precisely as possible. Our inferences are equally valid for quantitative and binary phenotypes, making no assumptions about their genetic architectures. Instead, we leverage well-established genetic models to account for linkage disequilibrium and population structure. We demonstrate that this method detects more associations than mixed effects models and achieves fine-mapping precision, at comparable computational cost. Lastly, we apply KnockoffZoom to data from the UK Biobank and report many new findings.