Physical models that can be used to obtain realistic accelerograms usually require a thorough knowledge of the source, path, and site effects. In addition, the computational resources needed might be expensive. Thus, empirical models still represent a good alternative for simulating strong ground motion. In this work, we modify and improve the model developed by Sabetta and Pugliese (1996). This new method models the time-domain accelerogram based on the assumption that the phase is random and that the time envelope can be represented by the so-called average instantaneous power. This is, in turn, described as a lognormal distribution for P and S waves combined with an algebro-exponential function representing the envelope of coda waves. In addition, the frequency content of the signal is nonstationary and follows a modified ω-square model. The method depends on four common indicators in earthquake engineering: peak ground acceleration, strong-motion duration, Arias intensity, and central frequency. These indicators are empirically connected to a given database by means of ground-motion prediction equations. In this study we calibrate the model using Japanese data recorded by the K-net array, which has high-quality digital accelerograms and station-site conditions characterized by geotechnical measurements. In addition, this technique permits the inclusion of the uncertainty of the model parameters to take into account the ground-motion natural variability in the stochastic generation of the time histories. The main goal of this work is to provide the earthquake engineering community with a flexible tool to generate realistic accelerograms for dynamic studies.