Updated

A woman's photo of her newborn baby — just delivered, and with the intrauterine device (IUD) that failed to prevent her pregnancy clenched in his tiny fist — has gone viral. But how does a woman get pregnant while using an IUD?

The woman, Lucy Hellein of Fort Mitchell, Alabama, posted the photo of her newborn son to Facebook last week with the caption “Mirena fail!" according to Metro.co.uk . (The photo has since been removed, but not before it was shared tens of thousands of times on social media.) A surgeon discovered the IUD behind the placenta during the delivery, according to Metro. Hellein told Metro that this was her third Mirena IUD, which she had inserted last summer. But in December, she found out she was 18 weeks pregnant. Her doctors initially assumed the IUD had fallen out, but then it turned up during her C-section.

An IUD is a type of long-acting, reversible contraception that is inserted into the uterus to prevent pregnancy.

Pregnancy among women who have IUDs is very rare. According to the American Congress of Obstetricians and Gynecologists (ACOG), IUDs are one of the most effective forms of birth control , with a failure rate of less than 1 percent during the first year of typical use. That's about the same rate as sterilization procedures such as "tube tying," ACOG said. According to Mirena, which makes a hormonal type of IUD, fewer than eight out of 1,000 women (0.8 percent) become pregnant over five years using the device.

More on this...

Still, in rare cases, pregnancy can occur. For example, the IUD can slip partly or completely out of the uterus, which happens in about 5 percent of users during the first year, ACOG said. This is most likely to occur soon after the device is inserted, and if this happens, a woman can get pregnant. Mirena advises its users to check about once a month to see if the device is in the right place. Women can do this by feeling for the threads attached to the device that extend down from the uterus into the top of the vagina.

Less commonly, the IUD may move and become embedded in the uterus, and very rarely, the device may pierce the uterus. If this happens, the device also does not protect against pregnancy and must be removed, according to Medscape.

Some IUDs also do not necessarily protect against pregnancy as soon as they are inserted. IUDs made from copper start working right away, but hormonal IUDs protect against pregnancy right away only if they are inserted during the first seven days of a woman's period, according to Planned Parenthood. If a hormonal IUD is inserted at another time in a woman's cycle, it takes seven days before the device is effective, and women should use another type of birth control, such as condoms, during this time, Planned Parenthood says.

Women who do become pregnant while they have an IUD inserted face a higher risk of an ectopic pregnancy , which occurs when an embryo implants outside of the uterus, according to Planned Parenthood. Up to half of pregnancies that occur with the Mirena IUD in place are likely to be ectopic, according to the company. In clinic trials with the device, 0.1 percent of users had an ectopic pregnancy in a single year, the company said.

If a woman becomes pregnant with an IUD and the pregnancy is inside the uterus, she has a risk of a severe infection, miscarriage and premature delivery, Mirena said. Because of this, doctors may try to remove an IUD if a woman becomes pregnant.

Hellein's son, Dexter Tyler, was born on April 27, weighing about 9 pounds. "Although he wasn't planned, my family and I feel incredibly blessed," Hellein told Metro.

Original article on Live Science .