In the wild, giant panda mating occurs just as nature specials would have you believe. There’s intense competition for each female, and the dominant male will mate with her several times to ensure success. And that strategy works: Wild female pandas generally give birth every two years. But that low birth rate means that captive breeding programs are essential to sustaining the endangered species. And in captivity, mating and successful pregnancies are tricky affairs—which is why it’s always a big deal when a cub is born, and devastating when one dies, as the 6-day-old cub at the National Zoo did last week.

Breeding pandas in captivity requires cooperation from zoos across the world, and is difficult for a number of reasons. Early on, scientists realized that the bears either lost interest in mating naturally or seemed like they didn’t know how. Take, for example, Ling-Ling and Hsing-Hsing, which were given to the National Zoo to commemorate Nixon’s 1972 visit to China. They tried to mate, unsuccessfully, for a decade; once they figured out what they were doing, they had five cubs, but none reached adulthood.

Scientists speculate that the awkward fumbling that sometimes occurs between captive pandas might be because the cubs were taken from their mothers too early and have never seen the deed done; lack of interest in mating might be attributed to lack of competition for the female.

Even if pandas are in the mood, time is working against them. A female is in heat only once a year, in the spring, for 12 to 25 days—but she’s only receptive to mating for two to seven of those days, and she’s only actually fertile for 24 to 36 hours. After that time passes, any more attempts at mating have to wait until the next year. So when scientists aren’t experimenting with other methods to get pandas to go at it—like dosing one male with Viagra or showing a matched pair panda porn—they often rely on artificial insemination to get the job done.

After Mating: The Waiting Game

Neither artificial insemination nor old-fashioned mating will guarantee a pregnancy, and zoologists must bide their time before they know for sure that a panda is expecting. This, too, is complicated. Like many other species, pandas experience embryonic diapause, in which the embryo is fertilized, but not yet implanted in the uterine wall. The offspring can’t continue to grow until it has implanted, so while the gestation period is around 50 days, some panda pregnancies can stretch out to more than 160 days because of diapause.

And as if that all wasn’t difficult enough for zookeepers to figure out, female pandas can experience pseudopregnancy—they aren’t actually pregnant, but exhibit the same behaviors as pregnant pandas (decreased appetite, sluggishness, and even similar changes in hormones). It's almost impossible to distinguish between the two, because recently implanted fetuses are often too tiny to be spotted on an ultrasound. But there are some developments that might help scientists determine whether or not a panda is actually pregnant: Scientists in the reproductive physiology department at the San Diego Zoo used thermal imaging cameras to help determine if their panda, Bai Yun, was pregnant (she was—watch her cuddling with the little guy on the zoo's Panda Cam); the idea is that right before a fetus attaches to the uterus, there is increased blood flow to that area, which will show up as bright red on the camera.

Still, even if a panda is pregnant, and her cub is born, the tiny, blind and toothless young, which is about the size of a stick of butter at birth (or 1/900th the size of its mother), might not survive.

It all adds up to grim odds for pandas: In 2004, there were approximately 1600 left in the wild, and zoos around the world currently hold around 300 of the animals. But despite the rocky start that captive breeding programs had and the ongoing challenges zoos still face, the program has had its successes, especially in the last few years. And as scientists learn more about how these bears mate and raise their young, more pandas will have cubs that live to adulthood.