By a perturbation method two coupled nonlinear partial differential equations are derived, which describe nonlinear evolution of a three-dimensional surface gravity wave packet in a two-layer fluid, including the effect of its interaction with a long wavelength surface gravity wave and an internal wave. Both the cases h ≪ L and h ≫ L are considered, where L is the space scale length of variation of long waves and h is the total depth. Starting from these two coupled equations, balanced sets of nonlinear evolution equations in the lowest order both at nonresonance and at resonance are derived. From these equations modulational instability conditions are derived. Some of the results are shown graphically. © 1986.