PurposeCommunity pharmacies are critical healthcare providers facing unprecedented trading conditions during deep uncertainty. As such, this study aims to inform scholars and practitioners about the efficiency of marketing agility in enhancing firm performance while considering the mediating roles of government interventions and digitization.Design/methodology/approachA conceptual framework is constructed and validated. Six hypotheses are tested using partial least squares structural equation modeling (PLS-SEM), with 254 responses attained via a questionnaire.FindingsMarketing agility facilitated firm performance and digitization. However, findings elucidate the impact of government involvement and underscore the necessity for re-evaluating conventional metrics for firm performance amid deep uncertainty.Originality/valueThe efficacy of marketing agility has been acknowledged amidst deep uncertainty, yet more research is needed within the retail healthcare sector. This research addresses this gap.