It felt like the entire state of California, three-quarters of Nevada, and half of Arizona descended upon the San Diego Zoo earlier this month, with everyone on the same mission: to say goodbye to Bai Yun and Xiao Liwu.

Bai Yun and Xiao Liwu are the stars of the San Diego Zoo, a mother-son duo who spend their days the way I wish I could: eating, climbing things, and taking naps, all in front of their adoring fans. Giant pandas have been a staple at the zoo since 1996, and Xiao Liwu — also known as Mr. Wu — is the sixth cub to be born and raised in San Diego.

He may have the United States listed on his birth certificate, but Xiao Liwu is the property of China. And last month, the zoo announced it was time for him and Bai Yun to return to their ancestral homeland, leaving San Diego without pandas for the first time in more than two decades. Panda bears are my favorite, and there was no way I was going to let them depart for China without stopping by for one final visit.

My love of panda bears began at the age of 3, when my uncle gave me a stuffed panda for Christmas. (I called her Amanda the Panda, of course.) When I grew older I remained fascinated by pandas, ravenously consuming videos and books about them. And while I was trying to learn every fact possible about the bears, the San Diego Zoo was working with China to get them over to the U.S.

Two giant pandas were finally loaned to the zoo in 1996 for research purposes: Bai Yun, then just 5 years old, and Shi Shi. This was not a good time to be a panda — they were an endangered animal, with an estimated 1,200 or so in the wild. Bob Wiese, chief life sciences officer at the San Diego Zoo, recently told the Los Angeles Times that in 1996, the survival rate for cubs was just 10 to 20 percent.

That's exactly why the pandas were loaned out to the zoo — so scientists could conduct research, observe the bears, and try to determine ways to help panda cubs survive and thrive.

As is often the case, humans are one reason why pandas are threatened. In the wild, they live in dense forests in southwest China. As the human population increases there, more and more people are encroaching on their habitat. When forests are cut down, pandas lose places to hide and make dens, leaving them more susceptible to the elements.

Pandas are also hard to breed. Female pandas ovulate only once a year, and their window for mating is about 24 hours long. That alone is an issue, one that's compounded by pandas' reclusiveness. It can simply be hard for a female to find a mate when the time is right.

At zoos, when males have trouble mounting the females, artificial insemination can take place. Even then, it can take several months to know if the panda is actually pregnant. Whether or not a panda is with cub, her progesterone levels are the same, and oftentimes non-pregnant pandas enjoy acting like they are expecting — they'll sleep longer, eat less, and build nests. As if that's not enough, based on the way pandas are built, it's hard to find a fetus on an ultrasound, and pandas can be pregnant for anywhere from three months to more than six months.

In 1996, not much was known about panda behavior, and pandas were struggling to breed in zoos. Staffers at the San Diego Zoo and their Chinese counterparts came up with a conservation strategy, and started learning all they could about pregnancy, birth, and maternal care, through Bai Yun.

Bai Yun was a gift to researchers. She gave birth to Hua Mei in 1999, the first surviving giant panda born in the United States. Hua Mei was the first of many cubs, with Bai Yun going on to welcome Mei Sheng, Su Lin, Zhen Zhen, Yun Zi, and Xiao Liwu between 2003 and 2012. She's also now a grandmother, with Hua Mei — who was sent to the Wolong Reserve in China in 2004 — having birthed 10 cubs.

While Bai Yun's cubs did well in San Diego, this wasn't the case everywhere. Panda cubs need nutrient-dense milk, and some of the mother bears struggle to produce enough. Panda cubs are born tiny, blind, and incredibly helpless, and in the case of twins, the mother often only focuses on one cub, resulting in the other one usually dying.

Based on data collected from Bai Yun and her family, the San Diego Zoo's nutritionist was able to create a special milk formula for pandas that is now used worldwide. The zoo says their concoction, along with a hand-rearing technique developed by Chinese researchers, has boosted the survival rate of cubs reared in Chinese nurseries from 0 to 95 percent.

When the San Diego Zoo and China signed their first agreement, the pandas were scheduled to stay for 12 years; the loan was extended twice, in 2008 and 2013. Despite all the benefits of having pandas in San Diego for research purposes, the conservation plan always involved sending the bears back to China, where they will go to special facilities in protected areas.

The panda population has increased, not only in zoos but also in the wild. While there are still only about 2,000 pandas in the world, they have been downgraded from endangered to vulnerable on the International Union for Conservation of Nature's Red List of Threatened Species. Pandas aren't out of the woods entirely, but without the San Diego Zoo's partnership with China, the resulting research and scientific discoveries, and the attention brought to their plight, they might not have made it to 2019.

We're now entering a new phase of the zoo's conservation program. In a bit of good news, the zoo said it has no plans to dismantle the panda enclosure, meaning the bears might not be gone for too long (for those who want their panda fix, they can still be found in zoos in Washington, D.C., Memphis, and Atlanta).

The pandas will be on exhibit through April 29, before they make the long flight to China. When I went to say goodbye, the zoo was packed with people, and I got a hot tip from a volunteer near the flamingoes to stand on a bridge above the panda enclosure. Sometimes, she said, you can see them from above, a fun new perspective, away from the crowds. Sure enough, one of the pandas was relaxing on a rock, chowing down on some bamboo. I took several paparazzi-like photos, and then went down to the enclosure.

The love I have for pandas was not reciprocated that day, as either Bai Yun or Xiao Liwu — I still have no idea which one it was — decided before I got to the enclosure that it was nap time. So, instead of seeing their adorable face one last time, all I saw was panda backside, a fuzzy black and white blob sticking out from a rock formation. It was a rather anticlimactic way of bidding the pandas adieu, but I'm just grateful that I had the opportunity at all. Pandas are precious, and the success of the San Diego Zoo's panda program is a win for us all.