Wave-equation inversion is a powerful technique able to build higher-resolution images with balanced amplitudes in complex subsurface areas relative to migration alone. Wave-equation inversion can be performed in image space without making velocity-model or acquisition-geometry approximations. Our method explicitly computes the least-squares Hessian matrix, defined from the modeling/migration operators, and uses a linear solver to find the solution of the resulting system of equations. One important advantage of the explicit computation of the Hessian, compared to iterative modeling/migration operations schemes, is that most of the work (precomputing the Hessian) is done up front; afterward, different inversion parameters or schemes can be tried at lower cost. Another advantage is that the method canhandle 3D data in a target-oriented fashion. The inversion in the presence of a complex overburden leads to an ill-conditioned system of equations that must be regularized to obtain a stable numerical solution. Regularization can be implemented in the poststack-image domain (zero subsurface offset), where the options for a regularization operator are limited to a customary damping, or in the prestack-image domain (subsurface offset), where a physically inspired regularization operator (differential semblance) can be applied. Though the prestack-image-domain inversion is more expensive than the poststack-image-domain inversion, it can improve the reflectors' continuity into the shadow zones with an enhanced signal-to-noise ratio. Improved subsalt-sediment images in the Sigsbee2b synthetic model and a 3D Gulf of Mexico field data set confirm the benefits of the inversion.