In this paper we prove the Pohozaev identity for the semilinear Dirichlet problem \({(-\Delta)^s u =f(u)}\) in \({\Omega, u\equiv0}\) in \({{\mathbb R}^n\backslash\Omega}\) . Here, \({s\in(0,1)}\) , (−Δ)s is the fractional Laplacian in \({\mathbb{R}^n}\) , and Ω is a bounded C1,1 domain. To establish the identity we use, among other things, that if u is a bounded solution then \({u/\delta^s|_{\Omega}}\) is Cα up to the boundary ∂Ω, where δ(x) = dist(x,∂Ω). In the fractional Pohozaev identity, the function \({u/\delta^s|_{\partial\Omega}}\) plays the role that ∂u/∂ν plays in the classical one. Surprisingly, from a nonlocal problem we obtain an identity with a boundary term (an integral over ∂Ω) which is completely local. As an application of our identity, we deduce the nonexistence of nontrivial solutions in star-shaped domains for supercritical nonlinearities.