Mishneh Torah — Positive Mitzvot מצוות עשה, Chapter 191
The full Hebrew text of Mishneh Torah, Positive Mitzvot, Chapter 191, with English translation by Maimonides (Rambam).
למשוח כוהן למלחמה, שנאמר: "והיה, כקורבכם אל המלחמה; וניגש הכוהן" (דברים כ,ב).
To anoint a priest [who will address the people before] battle, as [Deuteronomy 20:2] states: "And it shall come to pass, when you approach the battle, the priest will come forward and speak to the people...."