History of earthquake’s damages have illustrated the high vulnerability and risks associated with failure of water transfer and distribution systems. Adequate mitigation plans to reduce such seismic risks are required for sustainable development. The first step in developing a mitigation plan is prioritizing the limited available budget to address the most critical mitigation measures. This paper presents an optimization model that can be utilized for financial resource allocation towards earthquake risk mitigation measures for water pipelines. It presents a framework that can be used by decision-makers (authorities, stockholders, owners and contractors) to structure budget allocation strategy for seismic risk mitigation measures such as repair, retrofit, and/or replacement of steel and concrete pipelines. A stochastic model is presented to establish optimal mitigation measures based on minimizing repair and retrofit costs, post-earthquake replacement costs, and especially earthquake-induced large losses. To consider the earthquake induced loss on pipelines, the indirect loss due to water shortage and business interruption in the industries which needs water is also considered. The model is applied to a pilot area to demonstrate the practical application aspects of the proposed model. Pipeline exposure database, built environment occupancy type, pipeline vulnerability functions, and regional seismic hazard characteristics are used to calculate a probabilistic seismic risk for the pilot area. The Global Earthquake Model’s (GEM) OpenQuake software is used to run various seismic risk analysis. Event-based seismic hazard and risk analyses are used to develop the hazard curves and maps in terms of peak ground velocity (PGV) for the study area. The results of this study show the variation of seismic losses and mitigation costs for pipelines located within the study area based on their location and the types of repair. Performing seismic risk analysis analyses using the proposed model provides a valuable tool for determining the risk associated with a network of pipelines in a region, and the costs of repair based on acceptable risk level. It can be used for decision making and to establish type and budgets for most critical repairs for a specific region.