Background and purpose: Accurate localization of the epileptic focus is essential for surgical treatment of patients with drug-resistant epilepsy. Electric source imaging (ESI) is increasingly used in pre-surgical evaluation. However, most previous studies have analysed interictal (II) discharges. Prospective studies comparing the feasibility and accuracy of II and ictal (IC) ESI are lacking. Methods: We prospectively analysed long-term video-electroencephalography recordings (LTM) of patients admitted for pre-surgical evaluation. We performed ESI of II and IC signals using two methods, i.e. equivalent current dipole (ECD) and a distributed source model (DSM). LTM recordings employed the standard 25-electrode array (including inferior temporal electrodes). An age-matched template head model was used for source analysis. Results were compared with intracranial recordings, conventional neuroimaging methods [magnetic resonance imaging (MRI), positron emission tomography (PET), single-photon emission computed tomography (SPECT)] and outcome at 1 year after surgery. Results: A total of 87 consecutive patients were analysed. ECD gave a significantly higher proportion of patients with localized focal abnormalities (94%) compared with MRI (70%), PET (66%) and SPECT (64%). Agreement between the ESI methods and intracranial recording was moderate to substantial (k = 0.56–0.79). A total of 54 patients were operated (47 patients more than 1 year ago) and 62% of them became seizure-free. The localization accuracy of II-ESI was 51% for DSM and 57% for ECD, and that for IC-ESI was 51% for DSM and 62% for ECD. The differences between the ESI methods were not significant. Differences in localization accuracy between ESI and MRI (55%), PET (33%) and SPECT (40%) were not significant. Conclusions: The II-ESI and IC-ESI of LTM data have high feasibility and their localization accuracy is similar to that of conventional neuroimaging methods.