Many governments have implemented strict lockdown measures to prevent the transmission of the new coronavirus (SARS-CoV-2). Compliance with these restrictions is vital and depends greatly on the level of trust in the institutions central to their development and implementation. The objectives of this study were to assess: (1) the effects of the Dutch lockdown measures imposed in March 2020 on trust in government and trust in science; and (2) whether these differ across social groups. We draw on unique data from the high-quality Longitudinal Internet Studies for the Social Sciences panel, which comprises a true probability sample of Dutch households (average participation rate: 80.4%). Our data were collected on an ongoing basis from December 2017 to March 2020 (n = 2219). Using the implementation of lockdown measures in mid-March as a natural experiment, we employed difference-in-differences analyses to assess the causal effect of the Dutch lockdown measures on trust in government and trust in science. We estimated that the imposition of the measures caused an 18% increase (95% confidence interval (CI):15%-21%)) in trust in government and a 6% increase (95% CI: 4%-8%) in trust in science. The impact on trust in government was greater among the participants aged 65 and older and those with poor self-assessed health, although the relevant CIs were wide and, in the case of self-assessed health, included the null. No differential effects were observed for trust in science. Our study indicates that the strict public-health measures imposed in the Netherlands during an acute phase of the COVID-19 pandemic generated trust in the institutions involved in drafting and implementing them, especially among those with a higher risk of serious health outcomes. This suggests that, to prevent a major public-health crisis, people appreciate firm government intervention during the acute phase of an infectious disease pandemic.