In this study, a centrifugal pump has been optimized using the genetic algorithm coupled with computational fluid dynamics considering the flow physics for various impeller-diffuser configurations. During the automatic optimization process, the population was selected from a pool of pump geometries generated by four design variables; namely the relative diffuser vane angle, number of diffuser vanes, number of impeller blades, and the impeller wrap angle. The genetic algorithm was combined with a flow solver and a computer aided design software which was used also to create the mesh for the generated geometry. Two objective functions were adopted for the optimization: maximum pressure increase and minimum relative flow angle, which is an indication of reverse flow in the impeller. The iteration history of the optimization for the design (2.4 kg/s) and off-design (3.6 kg/s) flow rate showed that the optimization has been converged to an impeller-diffuser configuration within approximately 250 computational fluid dynamics analyses. Three geometries from each optimization with the highest pressure increase were studied for various mass flow rates and the results were compared with those of the original pump. The results show that the first optimization indicates a significant improvement of pressure increase at design flow rate (15.5%) but decrease at larger flow rates. The second optimization which was required after the results of the first optimization enhanced the head for the entire mass flow rates with an average increase of 25.74%.