Water hammer is a phenomenon caused by flow disturbances in transmission pipelines, resulting in high positive and negative pressures that can cause pipe fracture. This phenomenon occurs due to a sudden pump stoppage or valve closure. There are many ways to protect transmission pipelines against the pressures caused by a water hammer, including hydropneumatic tanks (HT). In this paper, HT is utilized to protect transmission pipeline supply systems in El-Shorouk City, Cairo, Egypt against pump failure. The objective is to identify the optimum sizing of HT, including the inlet diameter and the liquid ratio inside HT, to avoid the harmful effects of the water hammer. The Bentley HAMMER model is used to simulate and analyze steady-state and transient flow conditions in the transmission pipeline. The results indicate that reducing the inlet diameter till reaching 1/5 times the transmission pipeline diameter decreases the maximum pressure. Further reduction in the inlet diameter leads to an increase in the maximum pressure. The study also concludes that the optimum liquid ratio inside HT is 60% (and 40% air). The study achieves approximately 75% savings in the inlet diameter of HT and assigns the optimum liquid volume in HT. Regression analyses are performed and 14 equations are developed to predict the maximum pressure according to the ratio of inlet diameter to the transmission pipeline diameter and liquid ratio in HT.