The method of invariant imbedding, used extensively in astrophysics and in neutron transport theory, is applied to the analysis of dams whose input rate is a finite state-space continuous-parameter Markov chain. Passage-time distributions are considered as functions of the dam capacity. When the release rate is constant the method yields first-order non-linear differential equations with initial conditions obtained from the easily derived behaviour of a dam with zero capacity. Solutions of these equations are given. Some possible correlation functions for the increments of the cumulative input process are examined when the underlying Markov chain is stationary. Finally the analysis is extended to deal with dams having content-dependent release-rate of the form