The nonlinear problem of inversion of seismic waveforms can be set up using least-squares methods. The inverse problem is then reduced to the problem of minimizing a (nonquadratic) function in a space of many (10 4 to 10 6 ) variables. Using gradient methods leads to iterative algorithms, each iteration implying a forward propagation generated by the actual sources, a backward propagation generated by the data residuals (acting as if they were sources), and a correlation at each point of the space of the two fields thus obtained, which gives the updated model. The quality of the results of any inverse method depends heavily on the realism of the forward modeling. Finite-difference schemes are a good choice relative to realism because, although they are time-consuming, they give excellent results. Numerical tests performed with multioffset synthetic data from a two-dimensional model prove the feasibility of the approach. If only surface-recorded reflections are used, the high spatial frequency content of the model (but not the low spatial frequencies) is recovered in few ( approximately e5) iterations. By using transmitted data also (e.g., between two boreholes), all the spatial frequencies are recovered. Since the problem is nonlinear, if the initial guess is far enough from the true solution, the iterative algorithm may converge into a secondary solution. A nonlinear inversion with 8 shots, each shot recorded at 400 receiver locations, with 700 samples in each seismogram, corresponding to a 2-D model described by 40 000 grid points, takes approximately 1 hour in a CRAY 1S supercomputer.