When continents are stretched over a long period of time, deep elongated rift valleys form at Earth's surface and zones of ponded magma, centred beneath the rift, form at the crust-mantle boundary 1,2 . Ascending magma sometimes erupts within the rift valley 3,4 or, counterintuitively, at volcanic fields away from the rift valley that are o set by tens of kilometres from the source of magma at depth 5-8 . The controls on the distribution of this o -rift volcanism are unclear. Here we use a numerical model of magmatic dyke propagation during rifting to investigate why some dykes reach the surface outside the rift valley, whereas others are confined to the valley. We find that the location of magmatism is governed by the competition between tectonic stretching and gravitational unloading pressure, caused by crustal thinning and faulting along the rift borders. When gravitational unloading dominates over tectonic stretching forces, dykes ascending from the ponded magma are steered towards the rift sides, eventually causing o -rift eruptions. Our model also predicts the formation of stacked magma sills in the lower crust above the magma-ponding zone, as well as the along-rift propagation of shallow dykes during rifting events, consistent with observations of magmatism and volcanism in rift zones globally. We conclude that rift topography-induced stress changes provide a fundamental control on the transfer of magma from depth to the surface.Continental rifts are commonly flanked by magmatism during their early stages 5,6 . In the Miocene-Recent Main Ethiopian Rift (MER), for example, many Pliocene volcanoes lie outside the Miocene rift border faults 9,10 ( Fig. 1). As the cumulative extension has increased, magmatism has become focused within the rift axis 3 . A similar pattern is observed during the evolution of the Red Sea Rift, where ∼25-Myr-old rift-parallel dykes focus near the ∼30-Myr-old rift margins and the youngest volcanoes focus along the ridge axis 11 . Even in far less magmatically active settings, such as the Baikal Rift (Siberia) or the Chaine des Puys (CdP) in the Cenozoic rift system of France, off-rift volcanism occurred after the onset of rifting 7,8 .During rift initiation, the lithosphere thins by ductile stretching beneath a rift valley formed from normal faulting 12 . The upwelling asthenosphere melts by adiabatic decompression, with the greatest degree of partial melting beneath the most thinned rift valley 1,2 . Although most studies focus on in-rift magmatism 3,4 , a model is needed to explain how off-rift volcanoes are fed. Progressive rift spreading results in the oldest volcanoes being transported away from the rift axis. However, such a process does not explain off-rift volcanism, with volcanoes located outside the rift border faults. Previous models for off-rift volcanoes include low-angle detachments tapping the asthenosphere to the sides of highly asymmetric rifts 13 , or the flexural response at the base of the footwall of the active rift border faults 5 . These models are unsatisfac...