In 1886, Pope Leo instituted a variant amount of prayers to be prayed. One was to be prayed directly after the close of each Mass, The Saint Michael Prayer. It is said that one day, towards the end of Mass one day, Pope Leo had a vivid vision.
“Whatever happened during Pope Leo’s vision, it appears certain that he did have a vision and what he saw was not pleasant. It prompted him to quickly compose the Prayer to St. Michael, and to request its use at the end of Low Masses. The pope lived during particularly turbulent times, and he believed prayer was needed to dispel the darkness that hung over the world. A longer prayer to St. Michael, sometimes known as the exorcism prayer although it was not intended for use in actual exorcism rituals, was approved by the pope 3 years later in two versions, one for clergy and one for lay individual prayer.
St. Michael the Archangel has always been known to be a powerful intercessor against evil, especially since he is recorded in the Book of Revelation as, “fighting against the dragon; and the dragon and his angels fought, but they were defeated and there was no longer any place for them in heaven” (Revelation 12:7-9). Based on this episode in scripture, St. Michael is frequently depicted in art thrusting a lance, spear or sword into Satan, who is often depicted as a serpent or dragon.” (Aleteia.org)
Saint Michael Archangel,
defend us in battle,
be our protection against the wickedness and snares of the devil;
may God rebuke him, we humbly pray;
and do thou, O Prince of the heavenly host,
by the power of God, cast into hell
Satan and all the evil spirits
who prowl through the world seeking the ruin of souls.