The circadian rhythm of melatonin production was studied using on-line, in vivo microdialysis in the rat pineal gland. With this technique it was possible to record a pronounced melatonin rhythm with very high time resolution. Three phase-markers of the rhythm were calculated from the data, indicating increase (IT50), decrease (DT50) and amplitude of the rhythm. Comparing these phase markers led to several conclusions. Entrainment of the rhythm under constant darkness was performed with melatonin administration at different circadian stages [circadian time (CT) 8 and CT12] and for different periods of time (2 weeks and 4 weeks). Also, entrainment was established by applying 15 min light pulses at CT0. Entrainment of IT50 with melatonin partially uncoupled it from DT50. Four weeks entrainment in constant darkness (DD) caused a phase-delay in DT50 of 2.2 hr. Entrainment of IT50 with light at CT0 for 2 weeks in DD caused a phase-advance in DT50 of 1.3 hr. The entrainment with melatonin was restricted to a narrow window for melatonin to be applied, since injections at CT8 did not result in entrainment. Exogenous melatonin reduced the amplitude of the rhythm of endogenous melatonin. This effect was not circadian time dependent, since administration at CT8 for 2 weeks and at CT12 for 4 weeks resulted in a highly significant decrease. Light did not seem to have an effect on the amplitude. The data presented here provide us with new information about the nature of entrainment by melatonin. Since the present development of melatonergic agents for clinical use focuses on the entrainment capacity, effects of these compounds on amplitude of circadian rhythms needs to be addressed. In vivo microdialysis seems to be a good technique for that.