Narrated Al-Harith Al-Ash’ari:
that the Messenger of Allah (ﷺ) said:
“Indeed Allah commanded Yahya bin Zakariyya with five commandments to abide by, and to command the Children of Isra’il to abide by them. But he was slow in doing so.
So ‘Eisa said: ‘Indeed Allah commanded you with five commandments to abide by and to command the Children of Isra’il to abide by. Either you command them, or I shall command them.’
So Yahya said: ‘I fear that if you precede me in this, then the earth may swallow me, or I shall be punished.’
So he gathered the people in Jerusalem, and they filled [the Masjid] and sat upon its balconies. So he said: ‘Indeed Allah has commanded me with five commandments to abide by, and to command you to abide by.
The first of them is that you worship Allah and not associate anything with him. The parable of the one who associates others with Allah is that of a man who buys a servant with his own gold or silver, then he says to him: “This is my home and this is my business so take care of it and give me the profits.” So he takes care of it and gives the profits to someone other than his master. Which of you would live to have a servant like that?
And Allah commands you to perform Salat, and when you perform Salat then do not turn away, for Allah is facing the face of His worshipers as long as he does not turn away.
And He commands you with fasting. For indeed the parable of fasting, is that of a man in a group with a sachet containing musk. All of them enjoy its fragrance. Indeed the breath of the fasting person is more pleasant to Allah than the scent of musk.
And He commands you to give charity. The parable of that, is a man captured by his enemies, tying his hands to his neck, and they come to him to beat his neck. Then he said: “I can ransom myself from you with a little or a lot” so he ransoms himself from them.
And He commands you to remember Allah. For indeed the parable of that, is a man whose enemy quickly tracks him until he reaches an impermeable fortress in which he protects himself from them. This is how the worshiper is; he does not protect himself from Ash-Shaitan except by the remembrance of Allah.'”
The Prophet (ﷺ) said: “And I command you with five that Allah commanded me: Listening and obeying, Jihad, Hijrah, and the Jama’ah. For indeed whoever parts from the Jama’ah the measure of a hand-span, then he has cast off the yoke of Islam from his neck, unless he returns. And whoever calls with the call of Jahiliyyah then he is from the coals of Hell.”
A man said: “O Messenger of Allah! Even if he performs Salat and fasts?” So he (ﷺ) said: “Even if he performs Salat and fasts. So call with the call that Allah named you with: Muslims, believers, worshipers of Allah.”