A method for quantifying the uncertainty of hydrological forecasts is proposed. This approach requires the identification and calibration of a statistical model for the forecast error. Accordingly, the probability distribution of the error itself is inferred through a multiple regression, depending on selected explanatory variables. These may include the current forecast issued by the hydrological model, the past forecast error, and the past rainfall. The final goal is to indirectly relate the forecast error to the sources of uncertainty in the forecasting procedure, through a probabilistic link with the explaining variables identified above. Statistical testing for the proposed approach is discussed in detail. An extensive application to a synthetic database is presented, along with a first real-world implementation that refers to a real-time flood forecasting system that is currently under development. The results indicate that the uncertainty estimates represent well the statistics of the actual forecast errors for the examined events.