All of the psycho killing and betrayal in the anime is ultimately a result of Nagi's direct and indirect manipulation. He gives the girls their powers and then creates monsters for them to fight in order to train them to use violence to solve their problems. Then he manipulates a few characters to get the massive betrayals and killings we see in later parts. It is not clear exactly why he does this (though he laughs his head off over the betrayals and fawns over the killers) or who he is. Supposedly, he is just serving the Big Bad of the story, but the Big Bad is more of an Orcus on His Throne. At the end, Nagi seems to imply that he himself is an immortal demon and that, though the Big Bad is dead, Nagi can't be killed and will be back.