Expiratory muscle action is prominent during anaesthesia and can impair lung function. This activity is exaggerated by the use of opioids. Airway pressure during occlusion of expiration would be a valuable measure in the study of expiratory muscle activation. However, this would only be valid if the imposed occlusion did not itself alter muscle activation. This possibility can be checked by directly assessing muscle activity by electromyography; varying arterial carbon dioxide tensions and opioid action should be considered. We studied seven spontaneously breathing patients, anaesthetized with nitrous oxide and isoflurane, in four conditions: during an infusion of fentanyl and after naloxone, breathing normally and with breathing stimulated with CO(2). We compared diaphragm and external oblique abdominal electromyogram (EMG) signals during normal and occluded breaths. We also measured chest wall volume and compared airway occlusion pressure, during inspiration and expiration, with the EMG results. Inspiratory occlusion increased the duration of inspiration during hypercapnia by 20%, but not the rate of electrical activation of the diaphragm, indicating that occlusion does not cause a reflex increase in diaphragm contraction. In contrast, expiratory occlusion did not affect either the duration of expiration or the electrical activity of the external oblique muscles. In these conditions, except for a change in inspiratory duration, respiratory muscle activity is unaffected by airway occlusion. Airway occlusion will permit valid measures of muscle activity in inspiration and expiration and provide simple measurements of respiratory muscle function during anaesthesia.