As proteins are integrated into the membrane of the endoplasmic reticulum, some hydrophilic polypeptide segments are transported through the translocation channel, others remain in the cytosol, and hydrophobic transmembrane sequences are released into the lipid phase. We have addressed the molecular mechanism by which these events occur. We demonstrate that both the lumenal and the cytosolic domains of a membrane protein are synthesized while the ribosome is membrane bound, so that even cytosolic domains come in contact with the translocation channel. We also find that, before translation of the protein is terminated, transmembrane sequences can laterally exit the translocation channel and enter the lipid environment. These results have significant implications for the folding and assembly of membrane proteins.