Recent years have seen a growing literature on the environmental Kuznets curve (EKC) that resorts in a large part to cointegration techniques. The EKC literature has failed to acknowledge that such regressions involve unit root nonstationary regressors and their integer powers (e.g. GDP and GDP squared), which behave differently from linear cointegrating regressions. Here we provide the necessary tools for EKC analysis by deriving estimation and testing theory for cointegrating equations including stationary regressors, deterministic regressors, unit root nonstationary regressors and their integer powers. We consider fully modified OLS estimation, specification tests based on augmented and auxiliary regressions, as well as a sub-sample KPSS type cointegration test. We present simulation results illustrating the performance of the estimators and tests. In the empirical application for CO2 and SO2 emissions for 19 early industrialized countries over the period 1870-2000 we find evidence for an EKC in roughly half of the countries.