This paper presents a mathematical programming model for the optimal design of water networks in the agriculture. The proposed model is based on a new superstructure that includes all configurations in terms of use, reuse and regeneration of water in a field constituted by a number of croplands. The model also includes the allocation of pipelines, pumps and storage tanks in different irrigation periods. The objective function consists in maximizing the annual profit that is formed by the economic incomes owing to the crop sell minus the costs for fresh water, fertilizer, storage tanks, treatment units, piping and pumping. The proposed multi-period optimization problem is formulated as a mixed integer non-linear programming formulation, which was applied to a case study to demonstrate the economic, environmental and social benefits that can be obtained. (C) 2015 Elsevier Ltd. All rights reserved.