On the origin of transient magnetic fields