Climate change, pollution, civil conflicts, political instability, and a high rate of population growth all contribute to water shortages in Iraq which are predicted to increase in the future. Due to the importance of agriculture in Iraq which forms more than 75 percent of total demand, a sustainable agricultural water allocation scheme is necessary to find practical and applicable water conservation measures that helps mitigate the impact of potential droughts and water shortages. An agricultural irrigation reclaimed wastewater allocation optimization model was developed to optimally allocate crops and reclaimed wastewater (RW) on cultivated farmlands in order to maximize the net benefit. The optimization model is formulated using mixed-integer nonlinear programming (MINLP) solved by the branch and reduce optimization navigator (BARON) in the general algebraic mathematical solver (GAMS). The model maximizes the net farm income to determine the cultivated crop assigned to each farmland using three types of reclaimed wastewater (RW); tertiary treated wastewater; secondary treated wastewater; and primary treated wastewater. Constraints in the optimization model include: (1) reclaimed wastewater availability constraints and (2) irrigated farmlands constraints. The optimization model has been applied to 7045 hectares of farms located in the Alrustumia district to the south east of Baghdad, Iraq with 5.5 × 105 m3/d of treated wastewater. The use of tertiary treated wastewater provided the greatest net benefit under most scenarios evaluated while primary effluent provided the lowest net benefit as only low value crops could be cultivated.