Studies of the accuracy of partial rebreathing measurements of pulmonary blood flow (PBF) in patients with abnormal lungs have not fully explained the sources of error. We used computer models of emphysema and pulmonary embolism incorporating both ventilation-perfusion (V/Q) and ventilation-volume (V/V) heterogeneity to investigate systematic errors in partial rebreathing PBF measurements. We studied (i) errors produced under usual conditions, (ii) effects of recirculation, (iii) effects of alveolar-proximal airway and alveolar-capillary PCO2 and VCO2 differences, (iv) effects of alveolar V/Q inhomogeneity and (v) effects of rebreathing time. In the pulmonary embolism model the systematic error is only acceptable (<10%) when the simulated PBF is low (2-3 litre min(-1)). In the emphysema model PBF is underestimated by more than 20% at all cardiac outputs studied. Four sources of systematic errors were found. (i) Alveolar-proximal airway PCO2 gradients and flux differences between the proximal airway and alveolar compartments contribute most to the systematic error. (ii) V/Q inhomogeneity causes PCO2 gradients between the alveolar compartments and pulmonary capillary blood, and between pulmonary capillary compartments. (iii) Rebreathing times are inadequate in the presence of V/V mismatch. (iv) The apparent effect of venous blood recirculation is small in emphysema but significant in pulmonary embolism. We conclude that PBF cannot be measured accurately by partial rebreathing in lungs with emphysema or embolism. Systematic errors are caused mainly by errors in end-tidal PCO2 values.