Legion is a demon or group of demons, particularly those in two of three versions of the exorcism of the Gerasene demoniac, an account in the New Testament of an incident in which Jesus performs an exorcism.
The earliest version of this story exists in the Gospel of Mark, described as taking place in "the country of the Gerasenes". Jesus encounters a possessed man and calls on the demon to emerge, demanding to know its name – an important element of traditional exorcism practice. He finds the man is possessed by a multitude of demons who give the collective name of "Legion". Fearing he will drive them out of the world and into the abyss, they beg him instead to send them into a herd of pigs, which he does. The pigs then rush into the sea and are drowned (Mark 5:1–5:13).
This story is also in the other two Synoptic Gospels. The Gospel of Luke shortens the story but retains most of the details including the name (Luke 8:26–8:33). The Gospel of Matthew shortens it more dramatically, changes the possessed man to two men (a particular stylistic device of this writer) and changes the location to "the country of the Gadarenes". This is probably because the author was aware that Gerasa is actually around 50 km away from the Sea of Galilee (although Gadara is still 10 km distant). In this version, the demons are unnamed  (Matthew 8:28–8:32).
According to Michael Willett Newheart, professor of New Testament Language and Literature at the Howard University School of Divinity (2004), the author of the Gospel of Mark could well have expected readers to associate the name "Legion" with the Roman military formation, active in the area at the time (around 70 AD). The intention may be to show that Jesus is stronger than the occupying force of the Romans. Seyoon Kim, however, points out that the Latin legio was commonly used as a loan word in Hebrew and Aramaic to indicate a large number.