This study discusses issues of optimal water management in a complex distribution system. The main elements of the water-management system under consideration are retention reservoirs, among which water transfers are possible, and a network of connections between these reservoirs and water treatment plants (WTPs). System operation optimisation involves determining the proper water transport routes and their flow volumes from the
retention reservoirs to the WTPs, and the volumes of possible transfers among the reservoirs, taking into account transport-related delays for inflows, outflows and water transfers in the system. Total system operation costs defined by an assumed quality coefficient should be minimal. An analytical solution of the optimisation task so
formulated has been obtained as a result of using Pontryagin's maximum principle with reference to the quality coefficient assumed. Stable start and end conditions in reservoir state trajectories have been assumed. The researchers have taken into account cases of steady and transient optimisation duration. The solutions obtained
have enabled the creation of computer models simulating system operation. In future, an analysis of the results obtained may affect decisions supporting the control of currently existing water-management systems.