of conduct. War Violent ways of punishing criminals and prisoners of war were not explicitly condemned in Buddhism, but peaceful ways of conflict resolution and punishment with the least amount of injury were encouraged. The early texts condemn the mental states that lead to violent behavior. Nonviolence is an overriding theme within the Pāli Canon. While the early texts condemn killing in the strongest terms, and portray the ideal queen/king as a pacifist, such a queen/king is nonetheless flanked by an army. It seems that the Buddha's teaching on nonviolence was not interpreted or put into practice in an uncompromisingly pacifist or anti-military-service way by early Buddhists. The early texts assume war to be a fact of life, and well-skilled warriors are viewed as necessary for defensive warfare. In Pali texts, injunctions to abstain from violence and involvement with military affairs are directed at members of the sangha; later Mahayana texts, which often generalise monastic norms to laity, require this of lay people as well. The early texts do not contain just-war ideology as such. Some argue that a sutta in the Gamani Samyuttam rules out all military service. In this passage, a soldier asks the Buddha if it is true that, as he has been told, soldiers slain in battle are reborn in a heavenly realm. The Buddha reluctantly replies that if he is killed in battle while his mind is seized with the intention to kill, he will undergo an unpleasant rebirth. In the early texts, a person's mental state at the time of death is generally viewed as having a great impact on the next birth. Some Buddhists point to other early texts as justifying defensive war. One example is the Kosala Samyutta, in which King Pasenadi, a righteous king favored by the Buddha, learns of an impending attack on his kingdom. He arms himself in defence, and leads his army into battle to protect his kingdom from attack. He lost this battle but won the war. King Pasenadi eventually defeated King Ajātasattu and captured him alive. He thought that, although this King of Magadha has transgressed against his kingdom, he had not transgressed against him personally, and Ajātasattu was still his nephew. He released Ajātasattu and did not harm him. Upon his return, the Buddha said (among other things) that Pasenadi "is a friend of virtue, acquainted with virtue, intimate with virtue", while the opposite is