This paper presents a complete analytical solution of steady gravity flow between two reservoirs connected by a channel of slowly varying breadth and containing fluids of different densities and levels. The hydrostatic approximation is used and dissipation is neglected. It is shown that seven different regimes are possible depending on the value of the parameter δ = γ/ε, which is the ratio of relative lighter and denser reservoir level difference, γ, to positive relative density difference, ε. The exact solution of the problem is obtained for all these regimes. If the level of the heavier fluid reservoir is higher than the level of lighter fluid reservoir, δ ≤ 0, then the denser fluid plunges under the lighter motionless fluid. If δ ≥ 1, the lighter fluid runs up on a wedge of the motionless denser fluid. If 0 < δ < 1, two-directional exchange flow occurs. The exact analytical expressions for layer discharges for the entire range of the parameters ε and δ are found and discussed. Wood's (1970) experimental data with nonsmall ε are in good agreement with the theory. When ε → 0 an exchange regime exists as long as γ → 0 to keep their ratio between 0 and 1, 1 > γ/ε > 0. At this limit the existence of an exchange flow and the solution depend only on the ratio γ/ε, not the values of γ and ε individually, and the Boussinesq approximation can be used. Some examples of application of the theory to prediction of mass and volume transport through a contraction for steady and quasi-steady flows are given.