Rifting dynamics at spreading axes is governed by two processes: the large-scale plate divergence and the local magma accumulation in the crust-mantle transition layer. Both evolve simultaneously. A model is developed particularly for the situation in Iceland where a well studied rifting episode occurred in the Krafla volcanic system 1975-1984. Both the divergence and the buoyant rise of magma create tensile deviatoric stress in the axial region, but while divergence generates an altogether extensional stress field, uprising of buoyant melt produces tension only near the axis but compression of the sides. The buoyant rise is driven by the differential pressure gradient in rock and melt. The processes are studied with a two-dimensional finite-element routine. presently thermal effects are neglected. The model parameters are density difference, size of the buoyant body, externally applied stress field, mechanical properties of rock and melt. Relatively small amounts of divergence and small increases of buoyancy are shown to generate axial tension which can overcome the tensile strength. Axial tension produced by buoyant bodies can even overcome lateral compression. Observed long intervals of quiescence require either large rock strength, quasi-continuous stress relaxation, small buoyant bodies, and/or a compressive deviatoric stress normal to the axis during much of the time between rifting episodes. Buoyant rise and injection of melt must be important in generating compression.