We analyzed data from a large population-based prospective cohort study of household contacts of tuberculosis patients in Lima, Peru, to estimate the importance of within-household transmission relative to community-based transmission. We identified all adults (older than 15 years of age) who had incident pulmonary tuberculosis diagnosed at any of 106 public health centers in Lima from September 2009 to August 2012. A total of 14,041 household contacts of 3,446 index patients were assessed for tuberculosis infection and disease. We compared the prevalence of latent tuberculosis infection (LTBI) among persons who had received the Bacillus Calmette–Guérin vaccine in households with and without a microbiologically confirmed index case to estimate the age-specific risk of infection and excess risk of LTBI from household and community exposures. We found that the risk of infection from household and community sources increased from birth until 20 years of age. However, a large proportion of infections among child and young-adult household contacts could have been the result of household exposure. Excess infection risk associated with household exposure accounted for 58% (95% confidence interval: 47, 66) of LTBI prevalence among exposed children younger than 1 year of age, 48% (95% confidence interval: 39, 57) among 10-year-old children, and 44% (95% confidence interval: 34, 51) among 15-year-old adolescents. These findings suggest that expanded access to preventive therapy for older children and young-adult household contacts of known tuberculosis cases may be beneficial.