A novel approach based on Bayesian networks for short-term traffic flow forecasting is proposed. A Bayesian network is originally used to model the causal relationship of time series of traffic flows among a chosen link and its adjacent links in a road network. Then, a Gaussian mixture model (GMM), whose parameters are estimated through competitive expectation maximization (CEM) algorithm, is applied to approximate the joint probability distribution of all nodes in the constructed Bayesian network. Finally, traffic flow forecasting of the current link is performed under the rule of minimum mean square error (MMSE). To further improve the forecasting performance, principal component analysis (PCA) is also adopted before carrying out the CEM algorithm. Experiments show that, by using a Bayesian network for short-term traffic flow forecasting, one can improve the forecasting accuracy significantly, and that the Bayesian network is an attractive forecasting method for such kinds of forecasting problems.