In instantaneous encephalogram or magnetoencephalogram (EEG/MEG) source analysis, ordinary least squares estimation (OLS) requires that the spatial noise is homoscedastic and uncorrelated over sensors. In spatio-temporal analysis OLS also requires that the noise is homoscedastic and uncorrelated in time (over samples). Generally, these assumptions are violated and, as a consequence, OLS can give rise to inaccuracies in the estimates of location and moment parameters of sources underlying the EEG/MEG. To improve these estimates of the sources, the generalized least squares (GLS) was developed, which uses the spatial or spatio-temporal noise covariances. In GLS these noise covariances are estimated from trial variation around the mean. Therefore, GLS requires many trials to accurately estimate the spatial noise covariances and thus the source parameters. Alternatively, with maximum likelihood (ML) the spatial or spatio-temporal noise covariances can be modeled parametrically. Here, only the model parameters describing the noise covariances need to be estimated. Consequently, fewer trials are required to obtain accurate noise covariances and consequently accurate source parameters. In this paper ML estimation for spatio-temporal analysis is derived, and it is shown that the noise and source parameters can be estimated separately. Furthermore, the likelihood ratio function is proposed to estimate the spatial or spatio-temporal noise covariance model parameters, which can also be used to test whether the model is adequate.