Let M be a connected orientable compact irreducible 3-manifold. Suppose that ∂M consists of two homeomorphic surfaces F1 and F2, and both F1 and F2 are compressible in M . Suppose furthermore that g(M, F1) = g(M ) + g(F1), where g(M, F1) is the Heegaard genus of M relative to F1. Let M f be the closed orientable 3-manifold obtained by identifying F1 and F2 using a homeomorphism f : F1 → F2. The authors show that if f is sufficiently complicated, then g(M f ) = g(M, ∂M) + 1.