Rikki-tikki fought to protect his human and animal friends, and the cobras fought to defend their garden territory and their young. The events of the plot are created by the protagonist battling the antagonists. The final fight creates the climax of the story and ends the conflict.
Nursing an flood-affected mongoose to harbor in his home, Teddy's father let his son keep the small animal when he showed no aggressive signs. Time went by, and things seemed to be going okay; Rikki would come in and out as he pleased, and guard over his son at night. But when the two cobras (Nag and Nagaina) had snuck in their home to presumably kill him, his wife and their son, he was more than proud of the mongoose when Rikki killed one snake and chased the other out of the home.