Inversion of three-dimensional transient electromagnetic (TEM) data to obtain electrical conductivity and permeability can be done by a time-domain algorithm that extends to diffusive electromagnetic (EM) fields the imaging methods originally developed for seismic wavefields (Claerbout, 1971; Tarantola, 1984). The algorithm uses a conjugate-gradient search for the minimum of an error functional involving EM measurements governed by Maxwell's equations without displacement currents. The connection with wavefield imaging comes from showing that the gradient of the error functional can be computed by propagating the errors back into the model in reverse time and correlating the field generated by the backpropagation with the incident field at each point. These two steps (backpropagation and cross correlation) are the same ones used in seismic migration. The backpropagated TEM fields satisfy the adjoint Maxwell's equations, which are stable in reverse time. With magnetic field measurements the gradient of the error functional with respect to conductivity is the cross correlation of the backpropagated electric field with the incident electric field, whereas the gradient with respect to permeability is the cross correlation of the backpropagated magnetic field with the time derivative of the incident magnetic field. Tests on two-dimensional models simulating crosswell TEM surveys produce good images of a conductive block scatterer, with both exact and noisy data, and of a dipping conductive layer. Convergence, however, is slow.