The system of equations describing the shallow-water limit dynamics of the interface between two layers of immiscible fluids of different densities is formulated. The flow is bounded by horizontal top and bottom walls. The resulting equations are of mixed type: hyperbolic when the shear is weak and the behavior of the system is internal-wave like, and elliptic for strong shear. This ellipticity, or ill-posedness is shown to be a manifestation of large-scale shear instability. This paper gives sharp nonlinear stability conditions for this nonlinear system of equations. For initial data that are initially hyperbolic, two different types of evolution may occur: the system may remain hyperbolic up to internal wave breaking, or it may become elliptic prior to wave breaking. Using simple waves that give a priori bounds on the solutions, we are able to characterize the condition preventing the second behavior, thus providing a long-time well-posedness, or nonlinear stability result. Our formulation also provides a systematic way to pass to the Boussinesq limit, whereby the density differences affect buoyancy but not momentum, and to recover the result that shear instability cannot occur from hyperbolic initial data in that case.