We study the long-term impact of climate change on economic activity across countries, using a stochastic growth model where labour productivity is affected by country-specific climate variables - defined as deviations of temperature and precipitation from their historical norms. Using a panel data set of 174 countries over the years 1960 to 2014, we find that per-capita real output growth is adversely affected by persistent changes in the temperature above or below its historical norm, but we do not obtain any statistically significant effects for changes in precipitation. Our counterfactual analysis suggests that a persistent increase in average global temperature by 0.04oC per year, in the absence of mitigation policies, reduces world real GDP per capita by 7.22 percent by 2100. On the other hand, abiding by the Paris Agreement, thereby limiting the temperature increase to 0.01oC per annum, reduces the loss substantially to 1.07 percent. These effects vary significantly across countries. We also provide supplementary evidence using data on a sample of 48 U.S. states between 1963 and 2016, and show that climate change has a long-lasting adverse impact on real output in various states and economic sectors, and on labour productivity and employment.