The goal of this paper is to construct a compactification of the moduli space of degree d≥5 surfaces in P3, i.e. a parameter space whose interior points correspond to (equivalence classes of) smooth surfaces in P3 and whose boundary points correspond to degenerations of such surfaces. We study a more general problem and consider a divisor D on a Fano variety Z as a pair (Z,D) satisfying certain properties. We find a modular compactification of such pairs and, in the case of Z=P3 and D a surface, use their properties to classify the pairs on the boundary of the moduli space.