To determine the factors contributing to tuberculosis incidence in the U.S.-born and foreign-born populations in San Francisco, California, and to assess the effectiveness of tuberculosis control efforts in these populations, we performed a population-based molecular epidemiologic study using 367 patients with strains of Mycobacterium tuberculosis recently introduced into the city. IS6110-based and PGRS-based restriction fragment length polymorphism (RFLP) analyses were performed on M. tuberculosis isolates. Patients whose isolates had identical RFLP patterns were considered a cluster. Review of public health and medical records, plus patient interviews, were used to determine the likelihood of transmission between clustered patients. None of the 252 foreign-born cases was recently infected (within 2 yr) in the city. Nineteen (17%) of 115 U. S.-born cases occurred after recent infection in the city; only two were infected by a foreign-born patient. Disease from recent infection in the city involved either a source or a secondary case with human immunodeficiency virus (HIV) infection, homelessness, or drug abuse. Failure to identify contacts accounted for the majority of secondary cases. In San Francisco, disease from recent transmission of M. tuberculosis has been virtually eliminated from the foreign-born but not from the U.S.-born population. An intensification of contact tracing and screening activities among HIV-infected, homeless, and drug-abusing persons is needed to further control tuberculosis in the U.S.-born population. Elimination of tuberculosis in both the foreign-born and the U.S. -born populations will require widespread use of preventive therapy.