IMPORTANCE: Mandatory vaccination is a major tool to combat increasing vaccine hesitancy. In principle, a vaccination law, ie, a mandatory vaccination law without exemptions, applies equally to everyone, but its effects across different socioeconomic groups (SEGs) remain unknown. OBJECTIVE: To examine the association of a vaccination law with vaccination coverage in different SEGs during 1855 to 1900. DESIGN, SETTING, AND PARTICIPANTS: This population-based cohort study monitored 45 years (1855-1900) of Finland's first vaccination campaign against smallpox to estimate the association of the 1883 vaccination law with vaccination coverage in infants (age <
1 year) across different SEGs. Data were analyzed from October 2023 to January 2024. EXPOSURE: A mandatory smallpox vaccination law for all children. MAIN OUTCOMES AND MEASURES: Vaccination status was determined from vaccination records and defined as receiving 1 dose of the smallpox vaccine. The primary outcome was the annual vaccination coverage in different SEGs and its change before vs after the vaccination law. RESULTS: A total of 40 008 children aged less than 1 year were included. The high SEG had high vaccination coverage, at a mean (SD) of 90% (49 percentage points), and the law was associated with halting its declining trend. For the middle SEG, the law was associated with a 26-percentage point increase in coverage, to a mean (SD) of 83% (50 percentage points). For the low SEG, the law had no association with vaccination coverage, which always remained below 35% (mean [SD]: prelaw, 26% [22 percentage points]
postlaw, 32% [23 percentage points]). CONCLUSIONS AND RELEVANCE: In this cohort study, a historic vaccination law was not associated with increased vaccination in the SEG with the lowest vaccination coverage, emphasizing the need for additional interventions to increase vaccine uptake in low-coverage communities.