Background: Staphylococcus aureus bacteremia (SAB) is the leading cause of infective endocarditis in several countries. Since socioeconomic status (SES) is known to influence the risk of infectious diseases in general, we aimed to investigate the association between SES and SAB, and risk of subsequent endocarditis in a nationwide adult population. Methods: All Danish residents were consecutively included at age≥30years during 1996-2010. We obtained information on SES (highest attained educational level), comorbidities, and microbiologically verified SAB by cross-linking nationwide registries. The incidence rate ratios (IRRs) of SAB and later endocarditis were investigated using Poisson regression models adjusted for sex, age and year (reference=highest SES). Results: Our study population comprised 3,394,936 individuals (median age=43.2years). Over a median follow-up of 15.9years, 13,181 individuals acquired SAB. SES was inversely associated with SAB acquisition, which declined with increasing age, e.g. in individuals with lowest SES, IRRs were 3.78 (95% confidence interval [CI]=2.89-4.95) in age 30-50years, 1.87 (CI=1.60-2.18) in age>50-70years and 1.31 (CI=1.11-1.54) in age>70years (interaction-p<0.0001). Adjustment for comorbidities attenuated the IRRs, but the pattern persisted. No association between SES and endocarditis risk among patients with SAB was observed. Conclusions: Decreasing SES was associated with an increased risk of SAB, particularly in younger adults. SES was not associated with risk of subsequent endocarditis.