Like the prayer, the fast is also an ancient ritual of worship. In the above quoted verses of Surah Baqarah, it is mentioned that fasting has been made obligatory for the Muslims, just as it was made so for earlier peoples. Consequently, this is a reality that as a ritual of worship that trains and disciplines the soul, it has existed in various forms in all religions.
The civilizations of Nineveh and Babylon are very ancient. Once these places were inhabited by the Assyrians. The Prophet Jonah (sws) was sent to them. Initially, these people rejected Jonah (sws) but later professed faith in him. On this occasion, their repentance and turning back has been mentioned in the Bible in the following words:
The Ninevites believed God. They declared a fast, and all of them, from the greatest to the least, put on sackcloth. When the news reached the king of Nineveh, he rose from his throne, took off his royal robes, covered himself with sackcloth and sat down in the dust. Then he issued a proclamation in Nineveh: By the decree of the king and his nobles: Do not let any man or beast, herd or flock, taste anything; do not let them eat or drink. But let man and beast be covered with sackcloth. Let everyone call urgently on God. Let them give up their evil ways and their violence. (Jonah, 3:5-8)
In the Arabia of pre-Islamic times, the fast was a well known ritual of worship. The mere existence of the word صوم(sawm) in Arabic is evidence enough to show that the Arabs were fully aware of it. Dr Jawwad ‘Aliwrites:
Some narratives mention that the Quraysh used to fast on the day of ‘Ashur. On this day, they would gather, celebrate ‘id and enshroud the Ka‘bah. According to the historians, they fasted on this day to atone for a sin they had committed in the days of jahiliyyah – a sin whose burden laid heavily upon them. They would fast on this day to express their gratitude to God for saving them from the evil consequences of this sin. It is mentioned in certain narratives that Muhammad (sws) would also fast on this day before his prophethood … another reason that historians have cited for this fast observed by the Quraysh is that when once they were struck with famine, the Almighty rescued them from it, and in order to show their gratitude to Him they started to observe this fast.
In the shari‘ah of the People of the Book too, the fast is a common worship ritual. The Bible mentions fasts at a number of places, and besides using this word, it has used certain other expressions like “to sadden one’s self” and “self-denial” to connote it.
It is recorded in Exodus:
Then the LORD said to Moses: ‘Write down these words, for in accordance with these words I have made a covenant with you and with Israel’. Moses was there with the LORD forty days and forty nights without eating bread or drinking water. And he wrote on the tablets the words of the covenant – the Ten Commandments.(34:27-28)
It is recorded in Leviticus:
This is to be a lasting ordinance for you: On the tenth day of the seventh month you must sadden and not do any work – whether native born or an alien living among you – because on this day atonement will be made for you, to cleanse you. Then, before the LORD, you will be clean from all your sins. It is a sabbath of rest, and you must sadden yourselves; it is a lasting ordinance. (16: 29-31)
It is recorded in Judges:
Then the Israelites, all the people, went up to Bethel, and there they sat weeping before the LORD. They fasted that day until evening and presented burnt offerings and fellowship offerings to the LORD. (20:26)
It is recorded in Samuel:
They mourned and wept and fasted till evening for Saul and his son Jonathan, and for the army of the LORD and the house of Israel, because they had fallen by the sword.(2 Samuel 1:12)
David pleaded with God for the child. He fasted and went into his house and spent the nights lying on the ground. (2 Samuel 12:16)
It is recorded in Nehemiah:
On the twenty-fourth day of the same month, the Israelites gathered together, fasting and wearing sackcloth and having dust on their heads. Those of Israelite descent had separated themselves from all foreigners. They stood in their places and confessed their sins and the wickedness of their fathers. (9:1-2)
It is recorded in the Psalms:
Yet when they were ill, I put on sackcloth and humbled myself with fasting. When my prayers returned to me unanswered. (35:13)
It is recorded in Jeremiah:
So you go to the house of the Lord on a day of fasting and read to the people from the scroll the words of the Lord that you wrote as I dictated. (36:6)
It is recorded in Joel:
The day of the LORD is great; it is dreadful. Who can endure it? ‘Even now,’ declares the LORD, ‘return to me with all your heart, with fasting and weeping and mourning.’ Rend your heart and not your garments. Return to the LORD your God, for he is gracious and compassionate, slow to anger and abounding in love, and he relents from sending calamity. (2:11-13)
It is recorded in Zechariah:
Again the word of the LORD Almighty came to me. This is what the LORD Almighty says: ‘The fasts of the fourth, fifth, seventh and tenth months will become joyful and glad occasions and happy festivals for Judah. Therefore love truth and peace.’ (8:18-19)
It is recorded in Matthew:
‘When you fast, do not look sombre as the hypocrites do, for they disfigure their faces to show men they are fasting. I tell you the truth, they have received their reward in full. But when you fast, put oil on your head and wash your face, so that it will not be obvious to men that you are fasting, but only to your Father, who is unseen; and your Father, who sees what is done in secret, will reward you. (6:16-18)
It is recorded in Acts:
While they were worshiping the Lord and fasting, the Holy Spirit said: ‘Set apart for me Barnabas and Saul for the work to which I have called them’. So after they had fasted and prayed, they placed their hands on them and sent them off. (13:2-3)
This is a brief history of the ritual of the fast. It is evident from this overview that like the prayer, the fast too was well-known to the Arabs. They were fully aware of its religious status and its details viz-a-viz its bounds and limits. Consequently, when the Qur’an directed them to fast, these bounds and limits were not unknown to them: in fact, the words in which this directive was given, shows that they should observe it as an obligatory ritual which they knew as an age old ritual and an age old Sunnah of the prophets. The Prophet (sws) and his Companions (rta) fasted on this very basis and Muslims after them are following this practice generation after generation. Viewed thus, the source of the fast is also the consensus and tawatur (practical perpetuation) of the Muslims. The only thing that the Qur’an did was to make the fast an obligatory ritual, stipulating certain principles of lenience for the sick and for the travellers and to answer certain questions which were raised by the Muslims regarding the fast.
. Jawwad ‘Ali, Al-Mufassal fi tarikh al-‘arab qabl al-islam, vol. 2, 339-340.