How flat slab geometries are generated has been long debated. It has been suggested that trenchward motion of thick cratons in some areas of South America and Cenozoic North America progressively closed the asthenospheric wedge and induced flat subduction. Here we develop time-dependent numerical experiments to explore how trenchward motion of thick cratons may result in flat subduction. We find that as the craton approaches the trench and the wedge closes, two opposite phenomena control slab geometry: the suction between ocean and continent increases, favoring slab flattening, while the mantle confined within the closing wedge dynamically pushes the slab backward and steepens it. When the slab retreats, as in the Peru and Chile flat slabs, the wedge closure rate and dynamic push are small and suction forces generate, in some cases, flat subduction. We model the past 30 m.y. of subduction in the Chilean flat slab area and demonstrate that trenchward motion of thick lithosphere, 200–300 km, currently ∼700–800 km away from the Peru-Chile Trench, reproduces a slab geometry that fits the stress pattern, seismicity distribution, and temporal and spatial evolution of deformation and volcanism in the region. We also suggest that varying trench kinematics may explain some differing slab geometries along South America. When the trench is stationary or advances, the mantle flow within the closing wedge strongly pushes the slab backward and steepens it, possibly explaining the absence of flat subduction in the Bolivian orocline.