It’s a … surprise!

Congratulations are in order for an ape who gave birth at the San Diego Zoo — even though she’s been on birth control for years.

The special delivery of Eloise’s baby on Nov. 12 came as a complete shock to workers, who had no clue she was even expecting.

The 37-year-old siamang had been on a chemical contraception in an effort to maintain genetic diversity in the zoo population of the gibbon species, USA Today reported.

“We’re not certain why birth control didn’t work in this case, but as with humans, it is not uncommon for contraceptive failure to happen from time to time,” said the zoo’s animal care manager Jill Andrews. “Still, we are overjoyed — because any birth of an endangered species is a reason to celebrate.”

The baby — born to Eloise and her partner Unkie, 35 — is the first siamang born at the zoo in more than 12 years. Eloise has had six babies in the past, the last in 2006.

Its gender is not yet known because it hasn’t been separated from Eloise. Siamang mothers are known to be fiercely protective of their young, which are often captured and illegally sold as pets, the San Diego Union-Tribune said.

But the small apes pair for life, with the mother and father staying together to raise their brood.

“They’ve been together for a long time,” zoo spokesman Andrew James told the Union-Tribune. “The better option was to put her on birth control.”

An exam of the baby will be performed within the next few months.

“We’re just going to allow her to be a mama for right now,” said James.

Many species of gibbons, which populate the forests of southern Asia, are endangered, according to National Geographic.

Siamangs are classified as endangered by the International Union for Conservation of Nature and Natural Resources, with their habitats threatened by logging and agriculture.

In the wild, siamangs live about 30 years but, in captivity, they can live to 40 or older.