Abstruct-An efficient and accurate finite-element method is presented for computing transient as well as time-harmonic electromagnetic fields in three-dimensional configurations containing arbitrarily inhomogeneous media that may be anisotropic. To obtain accurate results with an optimum computational efficiency, both consistently linear edge and consistently linear nodal elements are used for approximating the spatial distribution of the field. Compared with earlier work, our formulation is generalized by adding a method for explicitly modeling the normal continuity along interfaces that are free of surface charge. In addition to this the conditions for efficiently solving timeharmonic problems using a code designed for solving transient problems are discussed. Finally a general and simple method for implementing arbitrary inhomogeneous absorbing boundary conditions for modeling arbitrary incident fields is introduced.