In a first order autoregressive model with drift, we derive the likelihood ratio test for a unit root against the stationary alternative. We also derive the test in a state space model with trend. Finite sample and asymptotic critical values are obtained by Monte Carlo simulations. A simulation study investigates the power performance of the likelihood ratio test and we also examine how a bias correction of the test affects the results.