The Angels that guard the fetus from the evil inclination:
God arranges two angels to guard the fetus while it is in the stomach of the mother. The purpose of this guarding is to protect the fetus from the evil inclination entering into it prematurely. Throughout the period of time that the fetus is in the mother’s room it internalizes the Torah and mitzvahs into his heart and all 248 limbs of his body. This is a result of the Torah that the fetus is taught while it is in his mother’s womb, as during this time it is taught the entire Torah. This itself is done in order so the holiness of the Torah and mitzvahs is internalized into the body prior to the evil inclination as the evil inclination only enters the body after the child is prepared to leave the womb and enter the air of the world. On this it states that sin stands at the opening as it stands at the opening of the womb ready to enter the fetus as soon as it is ready to be born. This is the purpose of the two angels who guard the fetus, to make sure that the evil inclination does not enter into the fetus prior to the time of birth.
 Tur Y.D. 305
 Bach Y.D. 305