Questions concerning mediated causal effects are of great interest in psychology, cognitive science, medicine, social science, public health, and many other disciplines. For instance, about 60% of recent papers published in leading journals in social psychology contain at least one mediation test (Rucker, Preacher, Tormala, & Petty, 2011). Standard parametric approaches to mediation analysis employ regression models, and either the “difference method” (Judd & Kenny, 1981), more common in epidemiology, or the “product method” (Baron & Kenny, 1986), more common in the social sciences. In this article, we first discuss a known, but perhaps often unappreciated, fact that these parametric approaches are a special case of a general counterfactual framework for reasoning about causality first described by Neyman (1923) and Rubin (1924) and linked to causal graphical models by Robins (1986) and Pearl (2006). We then show a number of advantages of this framework. First, it makes the strong assumptions underlying mediation analysis explicit. Second, it avoids a number of problems present in the product and difference methods, such as biased estimates of effects in certain cases. Finally, we show the generality of this framework by proving a novel result which allows mediation analysis to be applied to longitudinal settings with unobserved confounders.