Dexamethasone and betamethasone are the corticosteroids used for the purpose although the former is recommended over the latter based on its efficacy, safety, wide availability, and low cost  in spite of some counter-logic.  Betamethasone, on the other hand, is preferred over dexamethasone because it is thought to have better prophylaxis of brain softening of premature fetus.  They are used with the intention to help the lungs of a premature fetus develop before the fetus comes out.  They are given when the fetus is expected to be delivered within 24 to 48 hours. Treatment consists of 2 doses of 12 mg of betamethasone given intramuscularly 24 hours apart or 4 doses of 6 mg of dexamethasone given intramuscularly 12 hours apart. Optimal benefit begins 24 hours after initiation of therapy and lasts 7 days.   Antenatal steroids are currently used up to 36 weeks in some parts of the world obstetric practice.