Chronic cadmium (Cd) administration affects the circadian release of pituitary hormones in rats. To assess whether Cd modifies expression of two major clock genes, period (Per) 1 and Per 2, in the hypothalamic–pituitary unit and to what extent the changes could be prevented by melatonin, rats were exposed to CdCl 2 (5ppm in drinking water) with or without melatonin (3μg/mL drinking water) for 1 month and were killed at two time intervals, i.e. a the beginning of the rest span (09:00h) and at the middle of the activity span (01:00h). Hypothalamic and pituitary mRNA levels encoding Per 1 and Per 2 were measured by real-time PCR analysis. Cd treatment decreased expression of hypothalamic Per 1 gene at both time intervals, of hypothalamic Per 2 gene at 01:00h, and of adenohypophysial Per 1 and Per 2 genes at 09:00h. Melatonin administration counteracted most of the effects of Cd and augmented hypothalamic Per 2, and adenohypophysial Per 1 and Per 2 gene expression. The results indicate that Cd administered chronically in the drinking water to rats affected expression of clock genes in the hypothalamic–pituitary unit, an effect prevented by melatonin.