We derive an inversion scheme that fits the logarithms of seismic body-wave spectra to ω2 source shapes conditioned by anelastic attenuation with a frequency-independent Q. The residuals from this fit are then projected onto the set of sources and sites, with the source terms damped, to estimate residual source spectra and site response spectra. This two-part inversion process is iterated until the square of the residuals, summed over frequency for all recordings, is minimized. The absolute amplitudes of the source and site spectra are determined by fitting the site response spectra to estimates of the site amplification derived from geotechnical data. We apply this inversion process to three sets of recordings of Loma Prieta aftershocks. The first data set contains S waves recorded both in the Marina District and at nearby hard-rock stations. We constrain the site response using the S-wave velocity measured in a nearby borehole. The absolute site amplifications for the Marina stations are 15 to 20 at 1 Hz and 10 at 2.5 Hz. The other two data sets comprise the P- and S-wave recordings from 28 aftershocks ranging in size from MD = 2.1 to 4.6, obtained at accelerograph sites near the epicentral area. The P- and S-wave attenuations determined from the inversions are Q = 414 and 380, while the average near-site attenuations are t* = 0.012 and 0.026 sec, respectively. The average ratio of the S- to P-wave seismic moments is 1.1 ± 0.1, the ratio of the P- to S-wave corner frequencies is 1.24 ± 0.11, and the ratio of S- to P-wave radiated energy is 13.9 ± 3.2. The Brune stress drops for these aftershocks range from 8 to 800 bars. The largest earthquakes exhibit the largest stress drops, but there is no apparent dependence of stress drop on seismic moment for earthquakes with 1019 < M0 < 1021 dyne-cm.