To apply reverse-time migration to prestack, finite-offset data from variable-velocity media, the standard (time zero) imaging condition must be generalized because each point in the image space has a different image time (or times). This generalization is the excitation-time imaging condition, in which each point is imaged at the one-way traveltime from the source to that point.Reverse-time migration with the excitation-time imaging condition consists of three elements: (1) computation of the imaging condition; (2) extrapolation of the recorder wave field; and (3) application of the imaging condition. Computation of the imaging condition for each point in the image is done by ray tracing from the source point; this is equivalent to extrapolation of the source wave field through the medium. Extrapolation of the recorded wave field is done by an acoustic finite-difference algorithm. Imaging is performed at each step of the finite-difference extrapolation by extracting, from the propagating wave field, the amplitude at each mesh point that is imaged at that time and adding these into the image space at the same spatial locations. The locus of all points imaged at one time step is a wavefront [a constant time (or phase) trajectory]. This prestack migration algorithm is very general. The excitation-time imaging condition is applicable to all source-receiver geometries and variable-velocity media and reduces exactly to the usual time-zero imaging condition when used with zero-offset surface data. The algorithm is illustrated by application to both synthetic and real VSP data. The most interesting and potentially useful result in the processing of the synthetic data is imaging of the horizontal fluid interfaces within a reservoir even when the surrounding reservoir boundaries are not well imaged.