We define relative Gromov-Witten invariants of a symplectic manifold relative to a codimension-two symplectic submanifold. These invariants are the key ingredients in the symplectic sum formula of [IP4]. The main step is the construction of a compact space of ‘V -stable’ maps. Simple special cases include the Hurwitz numbers for algebraic curves and the enumerative invariants of Caporaso and Harris. Gromov-Witten invariants are invariants of a closed symplectic manifold (X, ω).