A new prestack inversion algorithm has been developed to simultaneously estimate acoustic and shear impedances from P-wave reflection seismic data. The algorithm uses a global optimization procedure in the form of simulated annealing. The goal of optimization is to find a global minimum of the objective function, which includes the misfit between synthetic and observed prestack seismic data. During the iterative inversion process, the acoustic and shear impedance models are randomly perturbed, and the synthetic seismic data are calculated and compared with the observed seismic data. To increase stability, constraints have been built into the inversion algorithm, using the low-frequency impedance and background Vs/Vp models. The inversion method has been successfully applied to synthetic and field data examples to produce acoustic and shear impedances comparable to log data of similar bandwidth. The estimated acoustic and shear impedances can be combined to derive other elastic parameters, which may be used for identifying of lithology and fluid content of reservoirs.