The miles Christianus (Christian soldier) or "milites Christi" (soldier of Christ) is a Christian allegory based on New Testament military metaphors, especially the Armor of God metaphor of military equipment standing for Christian virtues  and on certain passages of the Old Testament from the Latin Vulgate.
By the fifth century, the Church had started to develop doctrines that allowed for Christian participation in battle, though this was limited by a requirement that the fighting must be undertaken to convert infidels or spread the glory of Christ. Christians were not to fight for conquest or personal glory.
The concepts of miles Christi and militia Christi can be traced back to the first century AD. The phrase miles Christi, derived from a letter from Paul the Apostle and much employed by Pope Gregory VII, also appeared in the Gesta Francorum in reference to the young Prince Tancred, Bohemond, Godfrey and Count Raymond of Toulouse, each of whom were Christian leaders in the First Crusade.
The metaphor has its origins in early Christianity of the Roman Empire, and gave rise to the contrasting term paganus (hitherto used in the sense of "civilian," "one lacking discipline") for its opposite, i.e. one who was not a soldier of Christ.
Chivalry as the idealized image of knighthood was a common moral allegory in early Christian literature. Knighthood emerged as a concept during the time of Charlemagne. During the Saxon Wars, Charlemagne's Christian knights attended mass, surrounded by relics, before battles.
Fragments from 15th c. Polish chronicler Jan Długosz describe the sanctification of weapons and a concept of knighthood that was grounded in religion. It became a theme in art during the High Middle Ages, with depictions of a knight with his various pieces of equipment identified with various virtues. This parallels the development of the understanding in medieval Christendom of the armed nobility as defenders of the faith, first emphasized by Gregory VII in the context of the Investiture controversy and later made even more explicit with the actual military expeditions of the crusades. Depictions of the miles christianus with the emblematic Armour of God however remained very rare in the medieval period and only became prominent after the Protestant Reformation.
In the early modern period, the understanding of the term again became more metaphorical, but it survives in various Christian orders or confessions; it is especially pronounced among the Jesuits and in the Salvation Army, and it is the central theme of the 18th century hymn "Soldiers of Christ, Arise" and the 19th century hymn "Onward, Christian Soldiers."