We propose a new model for stochastic mortality. The model is based on the literature on affine term structure models. It satisfies three important requirements for application in practice: analytical tractibility, clear interpretation of the factors and compatibility with financial option pricing models. We test the model fit using data on Dutch mortality rates. Furthermore, we discuss the specification of a market price of mortality risk and apply the model to the pricing of a guaranteed annuity option and the calculation of required economic capital for mortality risk.