The clinical use of the antibiotic erythromycin (ery) is hampered owing to the spread of resistance genes that are mostly mutating rRNA around the ery binding site at the entrance to the protein exit tunnel. Additional effective resistance mechanisms include deletion or insertion mutations in ribosomal protein uL22, which lead to alterations of the exit tunnel shape, located 16 Å away from the drug's binding site. We determined the cryo-EM structures of the Staphylococcus aureus 70S ribosome, and its ery bound complex with a two amino acid deletion mutation in its ß hairpin loop, which grants the bacteria resistance to ery. The structures reveal that, although the binding of ery is stable, the movement of the flexible shorter uL22 loop towards the tunnel wall creates a wider path for nascent proteins, thus enabling bypass of the barrier formed by the drug. Moreover, upon drug binding, the tunnel widens further.