Wavefield extrapolation in depth, a vital component of wave-equation depth migration, is accomplished by repeatedly applying a mathematical operator that propagates the wavefield across a single depth step, thus creating a depth marching scheme. The phase-shift method of wavefield extrapolation is fast and stable; however, it can be cumbersome to adapt to lateral velocity variations. We address the extension of phase-shift extrapolation to lateral velocity variations by using a spatial Gabor transform instead of the normal Fourier transform. The Gabor transform, also known as the windowed Fourier transform, is applied to the lateral spatial coordinates as a windowed discrete Fourier transform where the entire set of windows is required to sum to unity. Within each window, a split-step Fourier phase shift is applied. The most novel element of our algorithm is an adaptive partitioning scheme that relates window width to lateral velocity gradient such that the estimated spatial positioning error is bounded below a threshold. The spatial positioning error is estimated by comparing the Gabor method to its mathematical limit, called the locally homogeneous approximation — a frequency-wavenumber-dependent phase shift that changes according to the local velocity at each position. The assumption of local homogeneity means this position-error estimate may not hold strictly for large scattering angles in strongly heterogeneous media. The performance of our algorithm is illustrated with imaging results from prestack depth migration of the Marmousi data set. With respect to a comparable space-frequency domain imaging method, the proposed method improves images while requiring roughly 50% more computing time.