The nearly nonstationary first-order autoregression is a sequence of autoregressive processes y(n)(k + 1) = phi-n y(n)(k) + epsilon(k + 1), 0 less-than-or-equal-to k less-than-or-equal-to n, where the epsilon(k)'s are iid mean zero shocks and the autoregressive coefficient phi-n = 1 - beta/n for some beta > 0, so that phi-n --> 1 as n --> infinity. We consider a class of maximum likelihood type estimators called M estimators, which are not necessarily robust. The estimates are obtained as the solution phi-n of an equation of the form [GRAPHICS] where psi is a given "score" function. Assuming the shocks have 2 + delta moments and that psi-satisfies some regularity conditions, it is shown that the limiting distribution of n(phi-n - phi-n) is given by the ratio of two stochastic integrals. For a given shock density f satisfying regularity conditions, it is shown that the optimal psi-function for minimizing asymptotic mean squared error is not the maximum likelihood score in genera, but a linear combination of the maximum likelihood score and least squares score. However, numerical calculations under the constraint y(n)(0) = 0 show that the maximum likelihood score has asymptotic efficiency no lower than 40%.