Let Gamma be a cocompact lattice in SO(1, n). A representation rho: Gamma -> SO(2, n) is called quasi-Fuchsian if it is faithful, discrete, and preserves an acausal subset in the boundary of anti-de Sitter space. A special case are Fuchsian representations, i.e., compositions of the inclusions Gamma -> SO(1, n) and SO(1, n) subset of SO(2, n). We prove that quasi-Fuchsian representations are precisely those representations which are Anosov in the sense of Labourie (cf. [Lab06]). The study involves the geometry of locally anti-de Sitter spaces: quasi-Fuchsian representations are holonomy representations of globally hyperbolic spacetimes diffeomorphic to R x Gamma\H-n locally modeled on AdS(n+1).