The association between potential risk factors and the prevalence of pulmonary tuberculosis was studied in Shanghai Bureau of Sanitation. The study identified a total of 202 cases among 30,289 subjects, and showed that smoking, in particular heavy smoking, had a strong association with tuberculosis after simultaneous adjustment for other factors. Using a multivariate binomial regression, the factors adjusted included the age, sex, history of contact, area of housing and type of work. The relative risk of heavy smokers compared with nonsmokers was 2.17 (95% confidence interval 1.29-3.63). The study showed that although males and old age were associated with a higher risk of tuberculosis than females and young age respectively, these differences were due to the smoking factor. The study also found that the risk of tuberculosis among the subjects with previous patient contacts was twice as high as that among the non-contacts.