The quasi-biennial oscillation (QBO) in the equatorial zonal wind is an outstanding phenomenon of the atmosphere. The QBO is driven by a broad spectrum of waves excited in the tropical troposphere and modulates transport and mixing of chemical compounds in the whole middle atmosphere. Therefore, the simulation of the QBO in general circulation models and chemistry climate models is an important issue. Here, aspects of the climatology and forcing of a spontaneously occurring QBO in a middle-atmosphere model are evaluated, and its influence on the climate and variability of the tropical middle atmosphere is investigated. Westerly and easterly phases are considered separately, and 40-yr ECMWF Re-Analysis (ERA-40) data are used as a reference where appropriate. It is found that the simulated QBO is realistic in many details. Resolved large-scale waves are particularly important for the westerly phase, while parameterized gravity wave drag is more important for the easterly phase. Advective zonal wind tendencies are important for asymmetries between westerly and easterly phases, as found for the suppression of the easterly phase downward propagation. The simulation of the QBO improves the tropical upwelling and the atmospheric tape recorder compared to a model without a QBO. The semiannual oscillation is simulated realistically only if the QBO is represented. In sensitivity tests, it is found that the simulated QBO is strongly sensitive to changes in the gravity wave sources. The sensitivity to the tested range of horizontal resolutions is small. The stratospheric vertical resolution must be better than 1 km to simulate a realistic QBO.