Rikki-Tikki-Tavi, the mongoose battles Nag to the death in the bathroom inside the bungalow. After Nag is coiled around the water pot in the bathroom and sound asleep, Rikki jumps on his head and braces himself against the pot to try to hold Nag's head. Nag bangs Rikki against things "to and fro" and in great circles attempting to force the mongoose to release his jaws. Rikki refuses to let go, and Teddy's dad fires his shotgun killing Nag. Because Rikki kills Nag, the English family in the bungalow is safe, and Nagaina's plan to rule the garden is foiled.
Rikki-Tikki-Tavi later teases Nagaina with the single remaining cobra egg that he has not yet crushed, forcing her to fight to save that egg. She strikes at Rikki several times as he dances around her in a circle. Finally, Nagaina grabs up her egg and quickly slithers back to her snakehole. However, Rikki follow her down the hole. Just as Darzee begins to sing Rikki's death song, he emerges from the hole and says, "It is all over...The widow will never come out again." Because Rikki kills Nagaina as well as destroys all of her eggs, the garden and the bungalow are safe.
Many people feel that the snakes represents Indian soldiers and Rikki represents the British Empire.