I determine the critical behavior of a nonequilibrium three-dimensional lattice model exhibiting a phase transition to an absorbing state. Time-dependent Monte Carlo simulations in the vicinity of the critical point yield very accurate estimates for the location of the critical point and several critical exponents. Time-dependent simulations in the supercritical and subcritical regimes yield estimates for further critical exponents from the asymptotic behavior of the survival probability and the average number of particles. The results in the super- and subcritical regimes are also analyzed by utilizing the scaling laws describing the behavior of the model. The results for the critical exponents are the best obtained so far for a three-dimensional model with directed-percolation critical behavior.