Productive proton pumping by bacteriorhodopsin requires that, after the all-trans to 13-cis photoisomerization of the retinal chromophore, the photocycle proceeds with proton transfer and not with thermal back-isomerization. The question of how the protein controls these events in the active site is addressed here using quantum mechanical/molecular mechanical reaction-path calculations. The results indicate that, while retinal twisting significantly contributes to lowering the barrier for the thermal cis-trans back-isomerization, the rate-limiting barrier for this isomerization is still 5-6 kcal/mol larger than that for the first proton-transfer step. In this way, the retinal twisting is finely tuned so as to store energy to drive the subsequent photocycle while preventing wasteful back-isomerization.