Deleterious germline variants in certain DNA repair genes are risk factors for developing aggressive prostate cancer. The objective was to quantify their prognostic impact after prostate cancer diagnosis. Men with prostate cancer, predominantly of European ancestry, were included from four cohorts with long-term follow-up. Pathogenic or likely pathogenic germline variants in 26 DNA repair genes were assessed in relation to metastasis-free survival in high-risk, localized prostate cancer and to overall survival in metastatic castration-sensitive prostate cancer (mCSPC) and metastatic castration-resistant prostate cancer (mCRPC). Among 3,525 patients initially diagnosed with non-metastatic prostate cancer, 2,594 had high-risk localized prostate cancer, 429 mCSPC, and 502 mCRPC at inclusion. BRCA2 variant carriers did not have worse metastasis-free survival in high-risk localized prostate cancer (hazard ratio [HR] 1.01, 95% confidence interval [CI] 0.69, 1.46) or overall survival in mCSPC (HR 0.46, 95% CI 0.14, 1.45) or mCRPC (HR 0.60, 95% CI 0.31, 1.17) compared to non-carriers of DNA repair variants. Among 868 additional patients with de novo metastatic (M1) prostate cancer, BRCA2 variant carriers tended to have worse overall survival (HR 1.59, 95% CI 1.01, 2.51). BRCA2 prognostic associations were not explained by radiation, PARP inhibitor, or platinum therapy. Results for other genes were limited in precision because variants were less common. Among patients with high-risk or metastatic prostate cancer who were initially diagnosed with and treated for non-metastatic tumors, germline DNA repair variants in BRCA2 do not confer a substantially worse prognosis.