Zoo biologists use genetic analysis, demographic statistics and keen familiarity to plan the sex lives of their charges. Their goal is to avoid inbreeding and produce healthy offspring, but sometimes, even the best scientists and most attentive zoo-keepers cannot prevent a tragedy.
The couple seemed like a good pair.
Already sporting a distinguished coat of grey fur at the age of 22, he was a stout, hale and hearty father of a young son.
She was a bit younger - 16 - but those who knew her thought she was ready for motherhood.
And crucially, the computer analysis showed they did not share any recent ancestors, making them a good genetic match.
So, in a Chicago love story, zoo-keepers brought together Kwan, a male silverback western lowland gorilla, and Bana, a demure female. They hit it off, and on 16 November, Bana gave birth to a healthy baby girl.
Managed sex lives
"Kwan did a really great job," said Maureen Leahy, curator of primates at the Lincoln Park Zoo in Chicago, in an interview shortly before the birth.
"This romance and match has actually paid off."
The pairing of Kwan and Bana was the product of a sophisticated breeding plan devised by a team of biologists to ensure the future genetic health of the US gorilla population.
The western lowland gorillas are just one of more than 300 species of animals in zoos across the US whose sex lives are carefully managed by the Population Management Center at the Lincoln Park Zoo.
Species specialists play matchmaker to anteaters, okapis, hyacinth macaws and many others, with more than 80,000 individual critters subject to their plans.
It's similar to internet dating, said Sarah Long, the centre's director.
"We use computers and databases to get a male and female together - and sometimes produce offspring," she said.
"We're not getting new founders... wild-born animals. Now zoos are more focused on preserving what we have."
The computer software they use weighs the pedigree of the males and females, in some cases all the way back to the wild, to determine whether they are a good genetic match.
Ideally, they want two animals whose ancestors' genes are scarce among the population - that is, they have few relatives living in US zoos.
Other factors include the ages of the possible mates and the distance between them, and whether a zoo has the resources to feed and care for another one.
"We'll look at that giraffe's age. Is she valuable or not?" Ms Long said.
"Do we want her to breed? Is she the reproductive age? Is there a male out there who she could breed with that's equally valuable? Is he the right age?"
Last year, Bana was living at a zoo in Brookfield, Illinois, about 20 miles away.
Fifty-two zoos across the country held 342 western lowland gorillas.
But Kwan was sexually and socially mature - and nearby.
The zoo keepers thought Bana would fit into the "sisterhood" of female gorillas already living with Kwan and his six-year-old son Amare.
With the match made, Bana arrived at the Lincoln Park Zoo in a climate-controlled van.
She and Kwan were introduced and a flirtation commenced, with Bana staring longingly at Kwan, throwing him her bedroom eyes for as much as an hour at a time.
"We actually kept her on oral contraceptives to make sure that she was socially established within the group before she got pregnant," she said.
Even while she was on the pill, she would go into heat and the pair would "solicit each other for breeding", Ms Leahy said.
Meanwhile, Bana settled into her role as a low-ranking female in the social group. That often meant keeping her distance from Kwan, who as the silverback stood at the top of the social hierarchy.
Eventually, the zoo-keepers decided Bana was ready to be a mum and took her off the pill.
After the infant was born, she thrived and met her milestones for growth, and Bana quickly learned to nurse.
Her social status rose, and she began to eat together with Kwan, who recognised the infant as his own and protected her when other gorillas played nearby.
Even the other juvenile gorillas were curious about the new arrival, Ms Leahy said.
But then, early on the morning of 25 November, zoo-keepers noticed the infant appeared listless in Bana's arms, and soon after, they realised she had died in the night.
A subsequent investigation shows she perished of a skull fracture, but zoo-keepers are adamant she did not suffer violence.
A necropsy showed no other wounds, no pulled-out hair, no scratches or bruises, and the infant was otherwise completely healthy.
"This was very accidental," Ms Leahy said.
And Ms Leahy says the infant's death does nothing to make the population planners think Bana's match with Kwan was made in error.
"Bana was demonstrating completely appropriate mothering behaviour and the social group itself was demonstrating completely appropriate behaviour [toward] a new infant," she said, "those were marks of success, in my book."
For now, the gorillas seem to be in mourning.
"The group as a whole definitely recognised the loss of this infant," Ms Leahy said.
"There was a lot of gentle nuzzling and touching [from] some of the females that wouldn't otherwise necessarily interact with Bana. The whole group really attended to her for several days after the infant was gone. Behaviourally, the group was a bit subdued."
Kwan and Bana have been spending time together, and Ms Leahy hopes the story will have a happy ending.
"We will continue to maintain her breeding recommendation," she said. In other words: "We're going to continue to let nature take its course."