Recruitment and derecruitment (R/D) of air spaces within the lung is greatly enhanced in lung injury and is thought to be responsible for exacerbating injury during mechanical ventilation. There is evidence to suggest that R/D is a time-dependent phenomenon. We have developed a computer model of the lung consisting of a parallel arrangement of airways and alveolar units. Each airway has a critical pressure (Pcrit) above which it tends to open and below which it tends to close but at a rate determined by how far pressure is from Pcrit. With an appropriate distribution of Pcrit and R/D velocity characteristics, the model able to produce realistic first and second pressure-volume curves of a lung inflated from an initially degassed state. The model also predicts that lung elastance will increase transiently after a deep inflation to a degree that increases as lung volume decreases and as the lung becomes injured. We conclude that our model captures the time-dependent mechanical behavior of the lung due to gradual R/D of lung units.