We propose a finite-difference algorithm for solving the time-dependent GinzburgLandau (TDGL) equation coupled to the appropriate Maxwell equation. The time derivatives are discretized using a second-order semi-implicit scheme which, for intermediate values of the Ginzburg-Landau parameter , allows time steps two orders of magnitude larger than commonly used in explicit schemes. We demonstrate the use of the method by solving a fully three-dimensional problem of a current-carrying wire with longitudinal and transverse magnetic fields. c 2002 Elsevier Science (USA)