The sermon on the mount begins with the Beatitudes. The background to the Beatitudes begins in Matthew 4. Jesus went everywhere to preach the gospel of the Kingdom, that the Kingdom was at hand.
Matthew 4:17
17 From that time Jesus began to preach and to say, “Repent, for the kingdom of heaven is at hand.”
Then in Matthew 5, we are introduced to the Beatitudes. The Beatitudes are foundational to entering in to the Kingdom of God. The Beatitudes serve as the path that leads into the Kingdom of God where we receive all spiritual blessings.
Matthew 5:1-12
1 And seeing the multitudes, He went up on a mountain, and when He was seated His disciples came to Him. 2 Then He opened His mouth and taught them, saying:
3 “Blessed are the poor in spirit,
For theirs is the kingdom of heaven.
4 Blessed are those who mourn,
For they shall be comforted.
5 Blessed are the meek,
For they shall inherit the earth.
6 Blessed are those who hunger and thirst for righteousness,
For they shall be filled.
7 Blessed are the merciful,
For they shall obtain mercy.
8 Blessed are the pure in heart,
For they shall see God.
9 Blessed are the peacemakers,
For they shall be called sons of God.
10 Blessed are those who are persecuted for righteousness’ sake,
For theirs is the kingdom of heaven.
11 “Blessed are you when they revile and persecute you, and say all kinds of evil against you falsely for My sake. 12 Rejoice and be exceedingly glad, for great is your reward in heaven, for so they persecuted the prophets who were before you..”