Proteins that permanently reside in the lumen of the endoplasmic reticulum (ER) must somehow be distinguished from newly synthesized secretory proteins, which pass through this compartment on their way out of the cell. Three luminal ER proteins whose sequence is known, grp78 ("BiP"), grp94, and protein disulphide isomerase, share the carboxy-terminal sequence Lys-Asp-Glu-Leu (KDEL). We show that deletion (or extension) of the carboxyl terminus of grp78 results in secretion of this protein when it is expressed in COS cells. Conversely, a derivative of chicken lysozyme containing the last six amino acids of grp78 fails to be secreted and instead accumulates in the ER. We propose that the KDEL sequence marks proteins that are to be retained in the ER and discuss possible retention mechanisms.