This paper investigates the role of primary healthcare in mitigating the consequences of the COVID-19 pandemic, focusing on the Brazilian Family Health Strategy (ESF) as a case study. ESF is Brazil’s major primary care initiative, with prior evidence indicating its effectiveness in improving various health outcomes. The COVID-19 pandemic submitted the Brazilian healthcare system to a rigorous and unprecedented stress test, whose repercussions are still under study. Using comprehensive administrative microdata from 2016 to 2022 encompassing dimensions related to mortality, healthcare service, supply of family health teams, and vaccination coverage, our empirical strategy accounts for heterogeneous effects based on program intensity and pandemic evolution of the 5570 Brazilian municipalities. Our findings reveal that municipalities with high-intensity of ESF coverage (i.e. stronger primary care) experienced 347.93 (95% CI: 289.04, 406.81) fewer COVID-19 and cardiorespiratory deaths per million inhabitants throughout the pandemic period, compared to those in low-intensity ESF areas, despite sharing similar profiles of deaths from respiratory and cardiovascular causes. Among the channels contributing to this relative performance, high-intensity ESF municipalities were found to engage in more home-based primary care visits and health promotion activities while maintaining a similar supply of community health workers. Additionally, they achieved higher vaccination coverage, and these effects were more pronounced in areas with greater ESF presence, emphasising the importance of primary care coverage. In conclusion, our findings underscore the relevance of strong primary care in mitigating the consequences of the pandemic and addressing post-pandemic health challenges.