This is one in a series of papers devoted to the foundations of Symplectic Field Theory sketched in [Y Eliashberg, A Givental and H Hofer, Introduction to Symplectic Field Theory, Geom. Funct. Anal. Special Volume, Part II (2000) 560--673]. We prove compactness results for moduli spaces of holomorphic curves arising in Symplectic Field Theory. The theorems generalize Gromov's compactness theorem in [M Gromov, Pseudo-holomorphic curves in symplectic manifolds, Invent. Math. 82 (1985) 307--347] as well as compactness theorems in Floer homology theory, [A Floer, The unregularized gradient flow of the symplectic action, Comm. Pure Appl. Math. 41 (1988) 775--813 and Morse theory for Lagrangian intersections, J. Diff. Geom. 28 (1988) 513--547], and in contact geometry, [H Hofer, Pseudo-holomorphic curves and Weinstein conjecture in dimension three, Invent. Math. 114 (1993) 307--347 and H Hofer, K Wysocki and E Zehnder, Foliations of the Tight Three Sphere, Annals of Mathematics, 157 (2003) 125--255].