Host species switches by bacterial pathogens leading to new endemic infections are important evolutionary events that are difficult to reconstruct over the long term. We investigated the host switching of Staphylococcus aureus over a long evolutionary timeframe by developing Bayesian phylogenetic methods to account for uncertainty about past host associations and using estimates of evolutionary rates from serially sampled whole-genome data. Results suggest multiple jumps back and forth between human and bovids with the first switch from humans to bovids taking place around 5500 BP, coinciding with the expansion of cattle domestication throughout the Old World. The first switch to poultry is estimated at around 275 BP, long after domestication but still preceding large-scale commercial farming. These results are consistent with a central role for anthropogenic change in the emergence of new endemic diseases.