The increased insight into the mechanism of bacterial protein translocation has resulted in new concepts for the production of heterologous proteins. The periplasm of gram-negative bacteria is revealed to have a role as a 'protein construction compartment', which can be used to fold complex proteins. Passage across the outer membrane, however, remains a challenge due to the high selectivity of the outer membrane translocase. In gram-positive bacteria, slow folding at the membrane-cell-wall interface can make heterologous proteins vulnerable to degradation by wall-associated proteases. The recent identification of thiol-disulfide oxidoreductases in Bacillus subtilis might open the possibility of secreting proteins containing multiple disulfide bonds from this host.