Mental fatigue is a form of fatigue, induced by continuous task performance. Mentally fatigued people often report having a hard time keeping their attention focussed and being easily distracted. In this study, we examined the relation between mental fatigue, as induced by time on task, and attention-related changes in event-related potentials (ERPs). EEG, reaction times and response accuracies were obtained from 17 healthy volunteers during two hours of task performance on an adapted Eriksen flanker task. In this task, the size of targets and flankers was manipulated to discern neuronal processes that are related to processing of relevant information from processes related to the processing of irrelevant information. The ERP data showed that effects induced by target size manipulation were not affected by time on task, while an initial effect of flanker size manipulation decreased gradually with increasing time on task. We conclude that attention was affected by mental fatigue, in the form of a decrease in the ability to suppress irrelevant information. In behavioural results, this was reflected by a tendency of participants to increasingly base their response decision on irrelevant information, resulting in decreased response accuracies.