Background: The existence of a pathophysiological link between headaches and muscle activity pattern is still being debated. The purpose of this study was to investigate the effect of pain on the timing pattern of the masseter muscle in patients with tension-type headache (TTH) and migraine without aura (MOA).Methods: 57 women (22 controls, 19 MOA and 16 TTH) participated in the study. The electromyographic (EMG) activity of masseter during the open-close-clench cycle (OCC) was recorded in the interictal and ictal stages.Results: In the interictal stage, the results showed no significant difference in EMG activity between patients and control groups. However, masseter muscles in subjects with TTH (both sides) and in MOA patients (left side) activated significantly earlier than the control in the ictal stage. The duration of left masseter was also significantly greater in the TTH than in the control group (P < 0.05).Conclusion: The findings of this study showed that activity pattern of masticatory muscles in headaches patients were affected by existence of pain. Furthermore, this study confirmed that temporal variables of EMG such as onset and duration rather than amplitude could be more reliable to identify altered activity pattern of muscles.