Bg 2.31

sva-dharmam api cāvekṣya
na vikampitum arhasi
dharmyād dhi yuddhāc chreyo ’nyat
kṣatriyasya na vidyate
Synonyms: 
sva-dharmam — one’s own religious principles; api — also; ca — indeed; avekṣya — considering; na — never; vikampitum — to hesitate; arhasi — you deserve; dharmyāt — for religious principles; hi — indeed; yuddhāt — than fighting; śreyaḥ — better engagement; anyat — any other; kṣatriyasya — of the kṣatriya; na — does not; vidyate — exist.
Translation: 
Considering your specific duty as a kṣatriya, you should know that there is no better engagement for you than fighting on religious principles; and so there is no need for hesitation.
Purport: 

Out of the four orders of social administration, the second order, for the matter of good administration, is called kṣatriya. Kṣat means hurt. One who gives protection from harm is called kṣatriya (trāyate – to give protection). The kṣatriyas are trained for killing in the forest. A kṣatriya would go into the forest and challenge a tiger face to face and fight with the tiger with his sword. When the tiger was killed, it would be offered the royal order of cremation. This system has been followed even up to the present day by the kṣatriya kings of Jaipur state. The kṣatriyas are specially trained for challenging and killing because religious violence is sometimes a necessary factor. Therefore, kṣatriyas are never meant for accepting directly the order of sannyāsa, or renunciation. Nonviolence in politics may be a diplomacy, but it is never a factor or principle. In the religious law books it is stated:

āhaveṣu mitho ’nyonyaṁ
jighāṁsanto mahī-kṣitaḥ
yuddhamānāḥ paraṁ śaktyā
svargaṁ yānty aparāṅ-mukhāḥ

yajñeṣu paśavo brahman
hanyante satataṁ dvijaiḥ
saṁskṛtāḥ kila mantraiś ca
te ’pi svargam avāpnuvan

“In the battlefield, a king or kṣatriya, while fighting another king envious of him, is eligible for achieving the heavenly planets after death, as the brāhmaṇas also attain the heavenly planets by sacrificing animals in the sacrificial fire.” Therefore, killing on the battlefield on religious principles and killing animals in the sacrificial fire are not at all considered to be acts of violence, because everyone is benefited by the religious principles involved. The animal sacrificed gets a human life immediately without undergoing the gradual evolutionary process from one form to another, and the kṣatriyas killed on the battlefield also attain the heavenly planets, as do the brāhmaṇas who attain them by offering sacrifice.

There are two kinds of sva-dharmas, specific duties. As long as one is not liberated, one has to perform the duties of his particular body in accordance with religious principles in order to achieve liberation. When one is liberated, one’s sva-dharma – specific duty – becomes spiritual and is not in the material bodily concept. In the bodily conception of life there are specific duties for the brāhmaṇas and kṣatriyas respectively, and such duties are unavoidable. Sva-dharma is ordained by the Lord, and this will be clarified in the Fourth Chapter. On the bodily plane sva-dharma is called varṇāśrama-dharma, or man’s steppingstone for spiritual understanding. Human civilization begins from the stage of varṇāśrama-dharma, or specific duties in terms of the specific modes of nature of the body obtained. Discharging one’s specific duty in any field of action in accordance with the orders of higher authorities serves to elevate one to a higher status of life.