Your baby's lungs continue to branch and divide. The cells lining the airways constantly produce fluid that leaves the lungs when your baby makes breathing movements. The release of this fluid is regulated by the vocal cords within the larynx.
In addition to fluid, the lungs have glands that produce mucus. Cells with tiny hairlike structures, known as cilia, have appeared that help move the mucus. This production of mucus is important once the baby is born to prevent the constant flow of air from drying the lining of the lungs, to trap dust particles, and to act as a barrier to infection.
Because the gut is still very immature, the gradual increase in amniotic fluid is due to the relatively low frequency of fetal swallowing. By 37 weeks your baby will be swallowing 1.75 pints (almost a liter), half of the total amniotic fluid volume, each day.