With phase inversion, one can estimate subsurface velocities using the phases of first-arriving waves, which are the frequency-domain equivalents of the traveltimes. Phase inversion is modified to make it suitable for processing traveltimes from near-surface refraction surveys. The modifications include parameterizing the model, correcting the observed phases, and selecting the complex frequency. This modified phase inversion is compared to traveltime tomography. For two comparisons using computer-simulated traveltimes, the difference between the estimated and correct models, the residual mean, and the residual standard deviation are smaller for the phase inversion than they are for the traveltime tomography. For a comparison using field data from an S-wave refraction survey, both methods estimate models that are consistent with the known geology. Nonetheless, the phase-inversion model includes small-scale features in the bedrock that are geologically plausible; the residual mean and the residual standard deviation are smaller for the phase inversion than they are for the traveltime tomography.