We propose a stable inversion method to create geologically constrained instantaneous velocities from a set of sparse, irregularly picked stacking- or rms-velocity functions in vertical time. The method is primarily designed for building initial velocity models for curved-ray time migration and initial macromodels for depth migration and tomography. It is mainly applicable in regions containing compacted sediments, in which the velocity gradually increases with depth and can be laterally varying. Inversion is done in four stages: establishing a global initial background-velocity trend, applying an explicit unconstrained inversion, performing a constrained least-squares inversion, and finally, fine gridding. The method can be applied to create a new velocity field (create mode) or to update an existing one (update mode). In the create mode, initially, the velocity trend is assumed an exponential, asymptotically bounded function, defined locally by three parameters at each lateral node and calculated from a reference datum surface. Velocity picks related to nonsediment rocks, such as salt flanks or basalt boundaries, require different trend functions and therefore are treated differently. In the update mode, the velocity trend is a background-velocity field, normally used for time or depth imaging. The unconstrained inversion results in a piecewise-constant, residual instantaneous velocity with respect to the velocity trend and is mainly used for regularizing the input data. The constrained inversion is performed individually for each rms-velocity function in vertical time, and the lateral and vertical continuities are controlled by the global velocity-trend function. A special damping technique suppresses vertical oscillations of the results. Finally, smoothing and gridding (interpolation) are done for the resulting instantaneous velocity to generate a regular, fine grid in space and time. This method leads to a stable and geologically plausible velocity model, even in cases of noisy input rms-velocity or residual rms-velocity data.