Abstract Background Recent studies have demonstrated sex-related differences in secondary prevention pharmacotherapy in patients with acute myocardial infarction (AMI), although guidelines recommend the same preventive approach in both women and men. Purpose This study extends earlier work by examining temporal trends of prescribing practices of secondary prevention medications using contemporary data from a long-term period in Switzerland, with particular regard to sex inequalities. Methods For the purpose of this retrospective analysis of prospectively collected data in the Acute Myocardial Infarction in Switzerland (AMIS) Plus registry, optimal medical therapy (OMT) was defined as the combination of all five guideline-recommended medications in AMI at discharge: aspirin, P2Y12 inhibitors, lipid-lowering drugs, beta blockers, and angiotensin converting enzyme inhibitors (ACEI) or angiotensin receptor blockers (ARB). Uni- and multivariable logistic regression analyses were performed. Results A total of 34'612 patients (men n=25’913, 75%) hospitalised with AMI between 2003 and 2022 were included in the analysis. The mean age was 66±13 years and women were on average 7 years older than men. Despite having more comorbidities, women benefited less frequently from OMT than men (51% vs. 60%) across all age groups (all p<0.001), with the greatest gap occurring in patients <50 years of age. Within the 20-year study period, significant increases over time were observed in the singular prescription of all OMT components, except for beta blockers (p=0.2). This translated into a marked increase in OMT prescription irrespective of age and sex (from 36% to 60%), mainly due to greater prescription of dual antiplatelet therapy (DAPT, from 71% to 91%) and lipid-lowering drugs (LLD, from 69% to 93%). The sex-related gap in OMT disfavoring women showed a uctuating trend over the years (getting reduced from 14% in 2003 to 0.7% in 2016 to widen again to 12% in 2022) whereas there was a continuous narrowing over time regarding the combination of DAPT plus LLD, from 18% to 10% at the beginning and the end of the observation, respectively (Figure 1). In multivariable analysis, age (OR 0.99, 95%CI 0.98-0.99, p<0.001) and female sex (OR 0.90, 95%CI 0.85-0.95, p<0.001) were independent predictors of deficient OMT prescription, while the performance of percutaneous coronary intervention was identified as the strongest positive predictor favoring it (OR 4.85, 95%CI 4.49-5.24, p<0.001). Conclusion Although there has been a gradual increase in the prescription of OMT over time among both women and men, concerning sex disparities disfavoring women, and particularly young women, remained. Targeted programs to reduce sex-related differences in secondary prevention care are warranted.