We describe the use of random field and permutation methods to detect activation in cortically constrained maps of current density computed from MEG data. The methods are applicable to any inverse imaging method that maps event-related MEG to a coregistered cortical surface. These approaches also extend directly to images computed from event-related EEG data. We determine statistical thresholds that control the familywise error rate (FWER) across space or across both space and time. Both random field and permutation methods use the distribution of the maximum statistic under the null hypothesis to find FWER thresholds. The former methods make assumptions on the distribution and smoothness of the data and use approximate analytical solutions, the latter resample the data and rely on empirical distributions. Both methods account for spatial and temporal correlation in the cortical maps. Unlike previous nonparametric work in neuroimaging, we address the problem of nonuniform specificity that can arise without a Gaussianity assumption. We compare and evaluate the methods on simulated data and experimental data from a somatosensory-evoked response study. We find that the random field methods are conservative with or without smoothing, though with a 5 vertex FWHM smoothness, they are close to exact. Our permutation methods demonstrated exact specificity in simulation studies. In real data, the permutation method was not as sensitive as the RF method, although this could be due to violations of the random field theory assumptions.