The Sermon on the Mount is the longest piece of teaching from Jesus in the New Testament, and occupies chapters 5, 6 and 7 of the Gospel of Matthew. The Sermon has been one of the most widely quoted elements of the Canonical Gospels.
This is the first of the Five Discourses of Matthew, the other four being Matthew 10, Matthew 13 (1–53), Matthew 18 and the Olivet discourse in Matthew 24.
The Sermon is set early in the Ministry of Jesus, after he has been baptized by John the Baptist in chapter 3 of Matthew's Gospel and gathered his first disciples in chapter 4.
Before this episode, Jesus had been "all about Galilee" preaching, as in Matthew 4:23, and "great crowds followed him" from all around the area. The setting for the sermon is given in Matthew 5:1-2. Jesus sees the multitudes, goes up into the mountain, is followed by his disciples, and begins to preach. The sermon is brought to its close by Matthew 8:1, which reports that Jesus "came down from the mountain followed by great multitudes".