This paper presents a new methodology for the real-time operation of water distribution systems under critical conditions of limited electrical energy due to emergencies such as extreme drought conditions, electric grid failure, and other severe conditions related to natural conditions. The basic objective of optimizing the operations of a water distribution system under limited availability of energy is to attempt to satisfy the required levels of demand at various locations while also meeting pressure requirements of the system and maintaining an optimal pumping schedule. The approach adopted here is to interface an optimization procedure (genetic algorithm) with a simulator (EPANET) in the framework of an optimal control problem to determine the real-time optimal operation of a water distribution system under limited electrical input under emergency conditions. The genetic algorithm searches over pump operation in combination with maximizing the demands that can be satisfied with limited energy input. The interfacing of the simulator and the genetic algorithm has been accomplished within the framework of MATLAB.