In the ruins of an ancient city in the Sri Lankan jungle, a community of macaque monkeys goes about its organized, even ritualistic monkey business. And monkeys, like the most powerful humans on Earth, play politics.

“Monkey Kingdom,” an immersive new Disneynature documentary, quickly establishes the troupe’s rules and pecking order. As in human society, there are high-born monkeys, low-born monkeys and many monkeys in between.

Maya is the lowest of the low. Her meals are often scraps left by other monkeys. Maya is not allowed to take shelter from the rain on Castle Rock. It’s a given that higher-born monkeys will do what they will with her or simply ignore her.

Making one’s way up from the bottom rung of monkey society is almost impossible. Maya’s likely destined for a harsh life in “Monkey Kingdom.” But a monkey’s life, also like human life, can be unpredictable. And Maya is resourceful in the ways of survival.

The “Monkey Kingdom” filmmakers cast Maya, an 8-year-old female, as their leading lady. A visually distinctive macaque with a blond bob hairdo and spotted nose, she’s a well-chosen protagonist who lives an amazing story.

Given a warm narration by Tina Fey, the film skillfully introduces the troupe and individuals therein. In addition to Maya, there’s Raja, the alpha-male ruler of the Castle Rock macaques. There’s also a trio of high-born, red-faced females dubbed The Sisterhood. They are monkey royalty. And there’s an elderly monkey, nearly 40 years old, Grandpa. He’s mostly around for comic relief.

Another character, Kumar, makes a big entrance into the Castle Rock realm. A young male interloper seeking a place for himself, he shows up accompanied by the rhythm-and-blues classic “What a Man” (a new version by Nikki, not the 1993 hit by Salt-n-Pepa and En Vogue).

It’s also fun hearing the theme from 1960s TV series “The Monkees” during the movie’s opening credits. Periodic songs in the film, plus monkeys being monkeys, equal lively and fun monkey music videos .

Macaques aren’t the only creature-characters in the story. Their jungle environment includes Castle Rock’s shy mongoose and langur monkeys, a monkey species far less entertaining than the bright and curious macaques.

There are predators, too, including a leopard and a monitor lizard, both of which are great stalkers.

Following “Earth,” “Oceans,” “African Cats,” “Bears” and “Chimpanzee,” “Monkey King” is the sixth Disneynature film. Despite the impressive earlier films, it seems something of a miracle that directors Mark Linfield (“Chimpanzee,” “Earth”) and Alastair Fothergill (“Chimpanzee,” “Bears”) and their crew filmed and assembled such an engrossing, well-scripted monkey tale.

“Monkey Kingdom” moves so smoothly and quickly that the filmmakers’ time-consuming dedication and labor-intense toil stays, as it should be, invisible.