A Bayesian approach for predicting RNA secondary structure that addresses the following three open issues is described: (1) the need for a representation of the full ensemble of probable structures; (2) the need to specify a fixed set of energy parameters; (3) the desire to make statistical inferences on all variables in the problem. It has recently been shown that Bayesian inference can be employed to relax or eliminate the need to specify the parameters of bioinformatics recursive algorithms and to give a statistical representation of the full ensemble of probable solutions with the incorporation of uncertainty in parameter values. In this paper, we make an initial exploration of these potential advantages of the Bayesian approach. We present a Bayesian algorithm that is based on stacking energy rules but relaxes the need to specify the parameters. The algorithm returns the exact posterior distribution of the number of destabilizing loops, stacking energy matrices, and secondary structures. The algorithm generates statistically representative structures from the full ensemble of probable secondary structures in exact proportion to the posterior probabilities. Once the forward recursions for the algorithm are completed, the backward recursive sampling executes in O(n) time, providing a very efficient approach for generating representative structures. We demonstrate the utility of the Bayesian approach with several tRNA sequences. The potential of the approach for predicting RNA secondary structures and presenting alternative structures is illustrated with applications to the Escherichia coli tRNA(Ala) sequence and the Xenopus laevis oocyte 5S rRNA sequence.