We derive the asymptotic distribution of the ordinary least squares estimator in a regression with cointegrated variables under misspecification and/or nonlinearity in the regressors. We show that, under some circumstances, the order of convergence of the estimator changes and the asymptotic distribution is non-standard. The t-statistic might also diverge. A simple case arises when the intercept is erroneously omitted from the estimated model or in nonlinear-in-variables models with endogenous regressors. In the latter case, a solution is to use an instrumental variable estimator. The core results in this paper also generalise to more complicated nonlinear models involving integrated time series.