Staphylococcus aureusis an important human pathogen, and the prevalence of antibiotic resistance is a major public health concern. The evolution of pathogenicity and resistance inS. aureusoften involves acquisition of mobile genetic elements (MGEs). Bacteriophages play an especially important role, since transduction represents the main mechanism for horizontal gene transfer.S. aureuspathogenicity islands (SaPIs), including SaPI1, are MGEs that carry genes encoding virulence factors, and are mobilized at high frequency through interactions with specific helper bacteriophages, such as 80α, leading to packaging of the SaPI genomes into virions made from structural proteins supplied by the helper. Among these structural proteins is the portal protein, which forms a ring-like portal at a fivefold vertex of the capsid, through which the DNA is packaged during virion assembly and ejected upon infection of the host. We have used high-resolution cryo-electron microscopy to determine structures of theS. aureusbacteriophage 80α portal in solution and in situ in the empty and full SaPI1 virions, and show how the portal interacts with the capsid. These structures provide a structural basis for understanding portal and capsid assembly and the conformational changes that occur upon DNA packaging and ejection.