We describe a new explicit three-dimensional solver for the diffusion of electromagnetic fields in arbitrarily heterogeneous conductive media. The proposed method is based on a global Krylov subspace (Lanczos) approximation of the solution in the time and frequency domains. We derive solutions stable to spurious curl-free modes and provide estimates of the computer complexity involved in the calculations. Such estimates together with numerical experiments attest to a computationally efficient method suitable for large-scale problems. Also included are modeling examples drawn from practical geophysical applications.