In bacteria, the hybrid transfer-messenger RNA (tmRNA) rescues ribosomes stalled on defective messenger RNAs (mRNAs). However, certain gram-negative bacteria have evolved proteins that are capable of rescuing stalled ribosomes in a tmRNA-independent manner. Here, we report a 3.2 angstrom-resolution crystal structure of the rescue factor Yae] bound to the Thermus thermophilus 70S ribosome in complex with the initiator tRNAifMet and a short mRNA. The structure reveals that the C-terminal tail of Yae] functions as a sensor to discriminate between stalled and actively translating ribosomes by binding in the mRNA entry channel downstream of the A site between the head and shoulder of the 30S subunit. This allows the N-terminal globular domain to sample different conformations, so that its conserved GGQ motif is optimally positioned to catalyze the hydrolysis of peptidyl-tRNA. This structure gives insights into the mechanism of Yae] function and provides a basis for understanding how it rescues stalled ribosomes.