Optimizing Resource Allocation in Fire Departments (RAFD) is crucial for enhancing Fire Protection Services (FPS) and ultimately saving lives. Efficient RAFD ensures that fire departments have the necessary resources to respond effectively to emergencies. This paper presents a method for optimizing RAFD based on performance assessment results, examining its impact on Fire Department (FD) efficiency in Portugal. Evaluating data from 353 FDs, two RAFD optimization methods were assessed: one adhering to Portuguese regulations and constraints, such as budget allocation limitations, and another without such constraints. Integrating a slack-based data envelopment analysis model and mixed-integer linear programming, the study found that incorporating FD efficiency scores in RAFD improved overall efficiency at national, district, and FD levels. While adherence to Portuguese regulations led to balanced resource allocation and a 4% performance improvement at the national level, relaxing constraints yielded an 8% improvement, albeit with potential performance deterioration in some FDs. The detailed budget and efficiency metric analysis provided in this paper offers actionable insights for fire protection services enhancement. This underscores the importance of diverse optimization strategies to enhance FD efficiency, with implications for decision-makers at the Portuguese National Authority for Emergency and Civil Protection and similar organizations globally.