About 2,000 patients now await a donor lung in the United States. Worldwide, 50 million individuals are living with end-stage lung disease. Creation of a bioartificial lung requires engineering of viable lung architecture enabling ventilation, perfusion and gas exchange. We decellularized lungs by detergent perfusion and yielded scaffolds with acellular vasculature, airways and alveoli. To regenerate gas exchange tissue, we seeded scaffolds with epithelial and endothelial cells. To establish function, we perfused and ventilated cell-seeded constructs in a bioreactor simulating the physiologic environment of developing lung. By day 5, constructs could be perfused with blood and ventilated using physiologic pressures, and they generated gas exchange comparable to that of isolated native lungs. To show in vivo function, we transplanted regenerated lungs into orthotopic position. After transplantation, constructs were perfused by the recipient’s circulation and ventilated by means of the recipient’s airway and respiratory muscles, and they provided gas exchange in vivo for up to 6 h after extubation.