An inverse-Q filtered migration algorithm performs seismic migration and inverse-Q filtering simultaneously, in which the latter compensates for the amplitudes and corrects the phase distortions resulting from the earth attenuation effect. However, the amplitudes of high-frequency components grow rapidly in the extrapolation procedure, so numerical instability is a concern when including the inverse-Q filter in the migration. The instability for each frequency component is independent of data and is affected only by migration models. The stabilization problem may be treated separately from the wavefield-extrapolation scheme. The proposed strategy is to construct supersedent of attenuation coefficients, based on given velocity and Q models, before performing wavefield extrapolation in the space-frequency domain. This stabilized algorithm for inverse-Q filtered migration is applicable to subsurface media with vertical and lateral variations in velocity and Q functions. It produces a seismic image with enhanced resolution and corrected timing, comparable to an ideal image without the earth attenuation effect.