2.37 If you are slain in a righteous war by enemies, you shall thery attain supreme bliss. Or, slaying the enemies, you shall enjoy this kingdom without obstacles. As the duty called war, when done without attachment to the fruits, becomes the means for winning supreme bliss, you will attain that supreme bliss. Therefore, arise, assured that engagement in war (here the duty) is the means for attaining release, which is known as man's supreme goal. This alone is suitable for you, the son of Kunti. This is the purport.

Sri Krsna then explains to the aspirant for liberation how to conduct oneself in war.