The aim of our study was to examine the effects of 16.7 Hz electromagnetic-field exposure on pineal melatonin production in healthy humans. The study was based on comparing urinary 6-hydroxymelatonin sulfate (6-OHMS) levels of 108 male railway workers between leisure periods and days following the start of service on electrically powered engines (66 engineers) or working beneath transmission lines (42 railway employees such as train attendants and station managers; controls). A repeated measures design was used, i.e., each volunteer served as his own control. The exposure averaged 20 muTesla in the most exposed workers and around 1 muTesla in the least exposed. Apart from magnetic exposure the workers were subject to a shift work schedule with daily advances between 15 min and 1 hr. Melatonin was assessed by sampling urinary 6-OHMS both in the morning and the early evening. Evening 6-OHMS values appeared to be lowered by a factor of 0.81 (95%CI: 0.73-0.90) during work days compared to leisure days among engine drivers, but not in the controls. The lowering was not confined to certain types of shift work such as early, normal, or late shifts. During subsequent leisure periods evening values recovered significantly, mean ratio = 1.27 (95%CI: 1.03-1.56), i.e., the effects appeared to be reversible. In contrast, morning 6-OHMS samples of engineers and controls did not differ much between work and leisure days. There was, however, a tendency for a rebound of morning values in a leisure period following a work period both for engineers and controls. The observed pattern appears to be in line with predictions of the "phase response curve." No evidence for a dose-response relation was found. The results support the hypothesis that 16.7 Hz magnetic fields alter 6-OHMS excretion in humans exposed to magnetic fields. An alternative explanation that cannot be excluded in this study is that the difference between engineers and controls is due to differential exposure to day light at work.