To identify risk factors for typhoid fever in Semarang city and its surroundings, 75 culture-proven typhoid fever patients discharged 2 weeks earlier from the Department of Medicine, Dr Kariadi Hospital and 75 controls were studied. The patients were seen over the period December 1992-February 1994. Control subjects were neighbours of cases with no history of typhoid fever, not family members, randomly selected and matched for gender and age. Both cases and controls were interviewed at home by the same trained interviewer using a standardized questionnaire. A structured observation of their living environment inside and outside the house was performed during the visit and home drinking water samples were tested bacteriologically. Univariate analysis showed the following risk factors for typhoid fever: never or rarely washing hands before eating (OR=3.28; 95% CI=1.41-7.65); eating outdoors at least once a week (OR=3.00; 95% CI=1.09-8.25); eating outdoors at a street food stall or mobile food vendor (OR=3.86; 95% CI=1.30-11.48); consuming ice cubes in beverage in the 2-week period before getting ill (OR=3.00, 95% CI=1.09-8.25) and buying ice cubes from a street vendor (OR=5.82; 95% CI=1.69-20.12). Water quality and living environment of cases were worse than that of controls, e.g. cases less often used clean water for taking a bath (OR=6.50; 95% CI=1.47-28.80), for brushing teeth (OR=4.33; 95% CI=1.25-15.20) and for drinking (OR=3.67; 95% CI=1.02-13.14). Cases tended to live in houses without water supply from the municipal network (OR=11.00; 95% CI=1.42-85.2), with open sewers (OR=2.80; 95% CI=1.0-7.77) and without tiles in the kitchen (OR=2.67; 95% CI=1.04-6.81). Multivariate analysis showed that living in a house without water supply from the municipal network (OR=29.18; 95% CI=2.12-400.8) and with open sewers (OR=7.19; 95% CI=1.33-38.82) was associated with typhoid fever. Never or rarely washing hands before eating (OR=3.97; 95% CI=1.22-12.93) and being unemployed or having a part-time job (OR = 31.3; 95% CI = 3.08-317.4) also were risk factors. In this population typhoid fever was associated with poor housing and inadequate food and personal hygiene.