The elevation of mountain belts increases at the subduction-to-collision transition in response to crustal thickening and processes like slab breakoff, but the main parameters controlling how much mountain height increases remain poorly understood. Based on analytical and finite-element force-balance models, we show that the increase in mountain height depends mainly on the magnitude of the shear force along the plate boundary fault (megathrust) and the reduction of submarine margin relief. During oceanic subduction, the megathrust shear force is balanced by the gravitational effect of the margin relief and the deviatoric stresses in the upper plate are low. When the submarine margin relief is reduced during the closure of the ocean basin, the effect of the gravitational force decreases and the upper plate experiences enhanced deviatoric compression, which allows the mountain height to increase until the deviatoric stresses beneath the high mountains are low again. If the increase in mountain height cannot keep pace with the submarine relief reduction, the compression of the upper plate increases by a few tens of MPa, which promotes tectonic shortening and mountain building. Our findings indicate that mountain height can increase by hundreds of meters to a few kilometers during continental collision, depending primarily on the trench depth during the subduction stage and possible syncollisional changes of the megathrust shear force.