The main concern of any emergency medical services (EMS) in the world is to provide quality services to emergency calls in the shortest possible time. In this paper, the Ambulance Location Routing problem (ALRP) is proposed that is a mathematical attempt to obtain optimal cost-oriented strategic decisions (locating EMS centers and allocating ambulance fleet) in a way that guarantees service quality factors like response time, service level, and definite treatment time through optimal ambulance routing. In response to the concerns that emergency medical services deal with, in this research, a novel mixed-integer two-stage stochastic programming model is developed that can consider the uncertain nature of parameters like emergency calls, travel times, and pathways, simultaneously. Considering a heterogeneous fleet of ambulances to provide specialized out-of-hospital services and to use the treatment golden time, and considering different types of patients in terms of the need to be transferred to the hospital, are among the most vital innovations of the proposed ALRP. To tackle the computational complexity, a new decomposition-based heuristic method called the Progressive Estimating Algorithm (PEA) is developed. PEA is a modified version of the classic PHA and solves its drawbacks, like the possibility of being placed in a loop or prolonging the solution time by changing the method of calculating the first stage variables in each iteration. Therefore, by considering a large number of scenarios, PEA can reach feasible near-optimal solutions more efficiently. We have employed the actual data of a city with nearly 800.000 population, as a case study to validate the proposed ALRP model and the PEA method. The obtained results demonstrate that the proposed ALRP solution is valid, and the PEA can reach the near-optimal solution, in a very reasonable time, and with no exception, outperform the PHA. The results also show that the ALRP model reduces costs on average by 30% compared to a benchmark model. In addition, it is found that the solution obtained for the case study can reduce costs by 58% compared to the current state of the EMS in this city while guaranteeing the quality of services. Furthermore, the need to use a heterogeneous fleet of ambulances and scattered stations in the region is recommended to improve the performance of EM services. Finally, the unique way of looking at the integrated problem of location, allocation, and routing in the proposed ALRP and the idea of PEA are attractive for further studies in the field of EMS planning and other optimization problems, and several suggestions for future studies are mentioned in Conclusion Section.