An automated on-line sleep-wake classification system based on an averaging technique of the running EEG is described. It operates for three rats simultaneously and is able to discriminate every 5 sec between wakefulness, light slow-wave sleep, deep slow-wave sleep, and paradoxical sleep. The hippocampal EEG and nuchal EMG are used as input parameters. The EEG is bandpass filtered after which a microcomputer samples and averages the filtered EEG and constructs spectrograms. The variability, the theta-delta ratio and the amplitude of the delta waves are obtained from these spectrograms. Together with the amplitude index of the EMG, these three EEG indices are subjected to decision rules for the identification of sleep-wake states. A first evaluation study showed 93% agreement between visual inspection and computer classification. In a second evaluation study 24-hr recordings were made. Clear circadian patterns emerged especially during the light period: deep slow-wave sleep was enhanced during the initial hours, while paradoxical sleep tended to increase over the latter hours. The outcome of these studies is compared with the results obtained with other automated sleep identification procedures.