The estimation of a parameter lying in a subset of a set of possible parameters is considered. This subset is the null space of a well-behaved function and the estimator considered lies in the subset and is a solution of likelihood equations containing a Lagrangian multiplier. It is proved that, under certain conditions analogous to those of Cramer, these equations have a solution which gives a local maximum of the likelihood function. The asymptotic distribution of this `restricted maximum likelihood estimator' and an iterative method of solving the equations are discussed. Finally a test is introduced of the hypothesis that the true parameter does lie in the subset; this test, which is of wide applicability, makes use of the distribution of the random Lagrangian multiplier appearing in the likelihood equations.