For the classical model of risk theory, we consider the covariance between the surplus prior to and at ruin, given that ruin occurs. A general expression for this covariance is given when the initial surplus u is zero, and we show that the covariance (and hence the correlation coefficient) between these two variables is positive, zero or negative according to the equilibrium distribution of the claim size distribution having a coefficient of variation greater than, equal to, or less than one. For positive values of u, the formula for the covariance may not always lead to explicit results and we thus also study its asymptotic behaviour. Our results are illustrated by a number of examples.