Idiopathic pulmonary fibrosis (IPF) is a progressive fibrosing interstitial lung disease of unknown etiology. Environmental factors, especially occupational agents, may be of great importance in the manifestation of IPF. We examined the relationship between occupational and environmental factors and IPF in Japan. A multicenter hospital-based case-control study was performed in 2001. Included were 102 cases aged 40 years or over who were within 2 years of having been diagnosed in accordance with the most recent criteria. Controls, aged 40 years or over, were 55 hospitalized patients diagnosed as having acute bacterial pneumonia and four outpatients with common colds. Data on occupational and environmental factors were obtained from a questionnaire. Multiple logistic regression analysis was used to estimate the adjusted odds ratios (ORs) and 95% confidence intervals (CIs) of IPF for single factors with adjustment for age, sex and region. Compared with controls, cases were more likely to have been managers, officials or production workers and less likely to have been protective service or materials handling workers. Clerical and related work was significantly related to a decreased risk of IPF after further adjustment for pack-years of smoking (OR = 0.42; 95% CI = 0.18-0.95). Exposure to metal dust was significantly associated with an increased risk of IPF (OR = 9.55; 95% CI = 1.68-181.12). From 20.0 to 39.9 pack-years of smoking was significantly associated with an increased risk of IPF (OR = 3.23; 95% CI = 1.01-10.84). Our results appear to confirm data from previous epidemiologic studies. Metal dust exposure may be a particularly important risk factor for IPF.