Nosocomial infections are a significant cause of morbidity, mortality, and increased treatment costs in hospitals. This study aimed to analyze the factors determining the implementation of biosafety measures by the nursing staff of four hospitals in Piura via a structural equation modeling (SEM) approach. A total of 215 nurses from various hospitals in the region participated by completing an online survey. The results demonstrated that extrinsic factors (FEX) positively influence the implementation of biosafety measures (BIOM) (β = 0.319 ***), as do intrinsic factors (FINT) (β = 0.520 **). Furthermore, intrinsic factors mediate the relationship between extrinsic factors and the implementation of biosafety measures (β = 0.443 ***). In conclusion, this study provides a deeper understanding of biosafety dynamics in healthcare settings and lays the groundwork for the development of customized interventions and ongoing training programs that ensure the optimal implementation of biosafety measures in hospitals.