The emergence of collective order in matter is among the most fundamental and intriguing phenomena in physics. In recent years, the dynamical control and creation of novel ordered states of matter not accessible in thermodynamic equilibrium is receiving much attention1–6. The theoretical concept of dynamical multiferroicity has been introduced to describe the emergence of magnetization due to time-dependent electric polarization in non-ferromagnetic materials7,8. In simple terms, the coherent rotating motion of the ions in a crystal induces a magnetic moment along the axis of rotation. Here we provide experimental evidence of room-temperature magnetization in the archetypal paraelectric perovskite SrTiO3 due to this mechanism. We resonantly drive the infrared-active soft phonon mode with an intense circularly polarized terahertz electric field and detect the time-resolved magneto-optical Kerr effect. A simple model, which includes two coupled nonlinear oscillators whose forces and couplings are derived with ab initio calculations using self-consistent phonon theory at a finite temperature9, reproduces qualitatively our experimental observations. A quantitatively correct magnitude was obtained for the effect by also considering the phonon analogue of the reciprocal of the Einstein–de Haas effect, which is also called the Barnett effect, in which the total angular momentum from the phonon order is transferred to the electronic one. Our findings show a new path for the control of magnetism, for example, for ultrafast magnetic switches, by coherently controlling the lattice vibrations with light.