The Psychomachia (Battle of Spirits or Soul War) is a poem by the Late Antique Latin poet Prudentius, from the early fifth century AD. It has been considered to be the first and most influential "pure" medieval allegory, the first in a long tradition of works as diverse as the Romance of the Rose, Everyman and Piers Plowman; however, a manuscript discovered in 1931 of a speech by the second-century academic skeptic philosopher Favorinus employs psychomachia, suggesting that he may have invented the technique.
In slightly less than a thousand lines, the poem describes the conflict of vices and virtues as a battle in the style of Virgil's Aeneid. Christian faith is attacked by and defeats pagan idolatry to be cheered by a thousand Christian martyrs. The work was extremely popular, and survives in many medieval manuscripts, 20 of them illustrated. It may be the subject of wall paintings in the churches at Claverley, Shropshire, and at Pyrford, Surrey, both in England. In the early twelfth century it was a common theme for sculptural programmes on façades of churches in western France, such as Aulnay, Charente-Maritime.
The word may be used more generally for the common theme of the "battle between good and evil", for example in sculpture. The duality portrayed in the book was the first of its kind to depict the different moral realms humans are battling within themselves. It was the first time one got to read how all are participating in the war of the soul, because Vice and Virtue both live within them and their decisions and actions determine the outcome of the conflict.
The plot consists of the personified virtues of Hope, Sobriety, Chastity, Humility, etc. fighting the personified vices of Pride, Wrath, Paganism, Avarice, etc. The personifications are women because in Latin, words for abstract concepts have feminine grammatical gender; an uninformed reader of the work might take the story literally as a tale of many angry women fighting one another, because Prudentius provides no context or explanation of the allegory.