The effects of controlled mechanical ventilation with PEEP (CMV), and spontaneous ventilation with continuous positive airway pressure (CPAP), CPAP with high frequency ventilation (CPAP-HFV) and spontaneous respiration without CPAP (SV) on immunocompetence were compared in open-heart surgery patients undergoing the weaning phase. T-lymphocyte and T-helper cell ratios decreased during CPAP (P less than 0.01) and SV (P less than 0.05). PWM-induced lymphocyte proliferative responses were decreased during CPAP-HFV (P less than 0.05), CPAP and SV (P less than 0.01) in whole blood and separated lymphocyte cultures compared to values during CMV. Con A-induced responses were also depressed during SV in whole blood cultures (P less than 0.01). When the synthesis and secretion of immunoglobulins were studied, only IgM production showed a decrease in PWM-stimulated cultures during SV (P less than 0.05). In spite of an increase in the cardiac index in the three spontaneous ventilation modes compared to CMV, a slight decrease instead of an immediate improvement was seen in immune responses on weaning to spontaneous ventilation modes.