The primary cause of RDS is the immaturity of the infant's lungs. Prematurity is a significant risk factor as the production of surfactant typically begins between 24 and 28 weeks of gestation and reaches adequate levels by 34 to 36 weeks. Other risk factors include maternal diabetes, cesarean delivery without labor, and a sibling who had RDS.