We have developed a robust and efficient finite difference algorithm for computing the magnetotelluric response of general three-dimensional (3-D) models using the minimum residual relaxation method. The difference equations that we solve are second order in H and are derived from the integral forms of Maxwell's equations on a staggered grid. The boundary H field values are obtained from two-dimensional transverse magnetic mode calculations for the vertical planes in the 3-D model. An incomplete Cholesky decomposition of the diagonal subblocks of the coefficient matrix is used as a preconditioner, and corrections are made to the H fields every few iterations to ensure there are no H divergences in the solution. For a plane wave source field, this algorithm reduces the errors in the H field for simple 3-D models to around the 0.01% level compared to their fully converged values in a modest number of iterations, taking only a few minutes of computation time on our desktop workstation. The E fields can then be determined from discretized versions of the curl of H equations.