This paper explores the proposal that there is a close link between counterfactual thinking and lying. Both require the imagination of alternatives to reality and we describe four studies which explore this link. In Study 1 we measured individual differences in both abilities and found that individuals with a tendency to generate counterfactual thoughts were also more likely to generate potential lies. Studies 2 and 3 showed that counterfactual availability influences people's ability to come up with lies and the extent to which they expect others to lie. Study 4 used a behaviotiral measure of deception to show that people tend to lie more in situations also known to elicit counterfactual thoughts. Overall, the results show that the imagination of alternatives to the past plays an important role in the generation of lies. We discuss the implications for the fields of counterfactual thinking and deception. (C) 2017 Elsevier B.V. All rights reserved.