Let’s be honest: Baby poop is an unfortunate part of parenting, and chances are, you’ll find yourself exposed to it and other body fluids in more ways than you’d like after baby arrives (looking at you diaper blowouts). But what happens with baby’s waste while they’re snuggled up in your womb?

As babies develop in the uterus, they start to adopt some of the functions they’ll perform after birth, such as peeing. Most babies do not poop until after they are born, so chances are, you won’t have to worry about being exposed to baby poo until after their arrival.

However, pre-birth poo is possible, and it can lead to complications that must be addressed right away.

Keep reading to learn more about your baby during their time in your womb, and what happens if baby does do a number two before their birth.

During the many months that your baby grows in the womb, they’ll take in nutrients and expel wastes. But in most cases, this waste is not in the form of feces.

When your baby poops for the first time, they emit a waste called meconium. This usually happens after birth — sometimes almost immediately after! Meconium is a dark greenish-black stool that looks like tar. If you breastfeed, you’re likely to continue seeing meconium for a few days after birth.

Your baby produces this waste product in their intestines shortly before birth. In some cases, however, complications can arise and your baby will produce meconium while they’re still in the womb. The waste can then collect in the amniotic fluid.

So what happens to waste then?

Babies in the womb need assistance getting nutrients, as well as removing waste products. Your placenta is the key to making all these functions happen.

The placenta is made up of cells that are formed in response to pregnancy. It’s eventually connected with the umbilical cord, which is considered your baby’s lifeline, as it’s the way you transfer nutrients and oxygen to them.

Through the placenta, your baby will also deposit waste products that you transfer out of your own body. So, there’s no poop or pee floating around your womb for the entire nine months.

The placenta is delivered after your baby.

While not the norm, it is possible for baby to pass meconium before birth. This can lead to a condition known as meconium aspiration syndrome (MAS). MAS happens when a newborn baby accidentally breathes in meconium-stained amniotic fluids.

MAS is a serious, but treatable, condition that happens in about 13 percent of live births. The meconium in the amniotic fluid can become a problem because these particles can get blocked in your baby’s airways and deprive them of oxygen.

Your doctor may be able to detect MAS if your baby isn’t breathing normally at birth. Healthcare providers on hand at the birth will work to resolve this form of respiratory distress.

Your baby’s airways will be suctioned to help remove meconium-filled fluids. Supplemental oxygen may be needed in some cases. Left untreated, MAS may lead to pneumonia.

What causes MAS?

There are many possible risk factors for MAS. Fetal distress is one known contributor. If there are complications with placenta or umbilical cord, your baby may not get adequate oxygen or blood supply, and this can cause distress and the baby to pass meconium.

MAS is also most common in babies born at term or slightly after (between 37 and 42 weeks), but not in preemies. While the elimination of fetal wastes in the womb doesn’t mean your baby will develop MAS, it’s still an important condition to be aware of.

While babies most often hold out on pooping until they’re born, they are certainly active urinators in the womb. In fact, your baby’s pee activity goes into overdrive between 13 and 16 weeks’ gestation, when their kidneys are fully formed.

Don’t worry about any mess though — your placenta helps remove some of this waste naturally. Some pee will remain in the amniotic fluid, but it’s not considered dangerous for your baby like meconium can be.

You likely have a lot more questions about your baby’s growth and development inside the womb (besides the all-important poop questions, of course).

Babies don’t usually poop until they’ve exited your womb. They then emit a form of newborn poop called meconium.

However, it’s possible for some babies to poop right before birth, where they then inhale meconium mixed in with amniotic fluids. Meconium aspiration syndrome is a common and treatable condition, but it’s important that your doctor addresses it quickly to avoid any further complications.