Resonant ultrafast excitation of infrared-active phonons is a powerful technique to control the electronic properties of materials, leading to remarkable phenomena such as light-induced enhancement of superconductivity
1
,
2
, switching of ferroelectric polarization
3
,
4
and ultrafast insulator to metal transitions
5
. Here we show that light-driven phonons can be utilized to coherently manipulate macroscopic magnetic states. Intense mid-infrared electric field pulses, tuned to resonance with a phonon mode of the archetypical antiferromagnet DyFeO
3
, induce ultrafast and long-living changes of the fundamental exchange interaction between rare-earth orbitals and transition metal spins. Non-thermal lattice control of the magnetic exchange, defining the very stability of the macroscopic magnetic state, allows us to perform picosecond coherent switching between competing antiferromagnetic and weakly ferromagnetic spin orders. Our discovery emphasizes the potential of resonant phonon excitation for the manipulation of ferroic order on ultrafast timescales
6
.