In this paper, a small remote area which is located in Nigeria has been considered as a model to be tested by a managing scheme for providing both electricity and water. In this strategy, the groundwater is pumped into a water tank which can be later used for supplying required irrigation and drinking water. A PAT (Pump as Turbine) is used as a hybrid system for supplying electricity and water as well as storing water in the water tank. Also, a PV (photovoltaic plant), a package of batteries (BAT) in addition to a diesel ICE (internal combustion engine) are used and optimized along with the best size of devices and managing system, with the purpose of obtaining the maximum economical operating strategy. In this paper, two cases are considered to assess the effectiveness of the system under study. Firstly, all of the mentioned devices are used to show how internal combustion engine system dominates all the other components due to the low cost of fuel. In the second case, all renewable resources have been exploited and optimized in order to make a 100% renewable system with least possible cost. Having about 53 variables makes this problem very complicated which requires to be solved by an algorithm with more accuracy. Therefore, a MGSA (Modified Gravitational Search Algorithm) with an adapted mutation tactic is used to find the best cost and management strategy. In the first case, although the cost of diesel oil is very low, by using the PAT, about 5% of diesel oil consumption is reduced. In the second case, in order to make a 100% renewable system, the size of PV is enlarged approximately 16 times in comparison with the first case. The hybrid PV-PAT storing structure is capable to deliver the water for irrigation and domestic requirements as well as 9% of the electricity needed for the rural community. (C) 2016 Elsevier Ltd. All rights reserved.