It is known that there is a positive commandment in the Torah to cry out in prayer and supplication to prevent a looming danger, so that it should not occur, and to fast on account of it. These laws are explained in the laws of fasting.
There are days when all of Israel fasts because of events that have taken place in the past, in order to awaken their hearts to the ways of repentance. This is also a reminder of our foul deeds, and those of our forefathers that are still part of our behavior, which has led to all these tragedies. Through the remembrance of this cycle we will be drawn to become better, as the verse states: "They admit their sins and those of their fathers'. " (Vayikrah 26.40, Rambam, Chapter 5 of 'Laws of the Fasts').
There are four such days:
1) The third day of the month of Tisrei, when Gedaliah ben Achikam was murdered, extinguishing the final ember of independent Jewish sovereignty. This caused the misfortunes to increase greatly.
2) The tenth of the month of Teves, when Nevuchadnezzer surrounded Yerushalayim, as is written in Melachim 2 (25.1), and in Yirmiyah (52.4); that in the ninth year of Tzedkiyahu's reign, in the tenth month on the tenth day, Nevuchadnezzer and his whole army came upon Yerushalayim. At this time Yechezkel was in Babylon with the exile of Yechonia, and the Holy One blessed be He revealed to him the exact date by way of prophecy, as it is stated in Yechezkel (24.1-2): "And the word of G-d came to me in the ninth year, in the tenth month on the tenth day, saying: Son of man! Write down for yourself today's date, this very day (for the king of Babylon was surrounding Yerushalayim that very day)." Meaning: He was commanded to write the date, that specific month and day, writing 'the tenth day of the tenth month', though the prophet did not know why he was commanded so. Later on it was revealed to him that the king of Babylon had surrounded Yerushalayim on that very day, and through this all realized that this was a true prophecy, for in Babylon it was revealed to the prophet the day and time (the language 'this very day' [in Hebrew] is equivalent to the maximum strength of the day, or midday.)
There was a reason for his prophecy: In those days there were false prophets who misled the Jews, like Chananya ben Ozur and his companions, who prophesied that the Temple would not be destroyed and the Jewish people would not be exiled from their land, which strengthened the hands of the sinners. Yirmiyahu had strove against them, exhorting the people to return to G-d, for if not the Temple was to be destroyed and the people exiled. For this they placed Yirmiyahu in prison, and threw him into the pit of mortar, as is recounted in Yirimiya. Therefore, G-d informed Yechezkel the Prophet in Babylon that Yirmiyah was a true prophet, and he [Yechezkel] prophesied in Babylon what had transpired in the Land of Israel, that on the tenth of Teves the troubles began, and that is why this date was set as a fast day for the generations.
3) The Seventeenth day of the month of Tammuz, when five occurrences happened:
- The Luchos were broken. [The two tablets containing the Ten Commandments]
- The daily sacrifice ceased to be brought in the First Temple.
- The city of Yerushalayim was breached (in the period of the destruction of the Second Temple).
- The wicked Apustomus burned the Torah.
- An idol was erected in the Heichal (inner sanctuary of the Temple)
4) Finally, the ninth of the month of Av, whereon there were also five tragic occurrences:
- 1. It was decreed on the Jews in the desert that their generation would not enter the Land of Israel.
- 2-3. The first and second Temples were destroyed. At the end of the book of Melachim 2 (25.8-9) it is written: "In the fifth month on the seventh day of the month, in the nineteenth year of Nevuchadnezzer's reign...Nevuzarradan came... and burnt the house of the L-ord...". At the end of the book of Yirmiyah (52.12) he writes in his account "on the tenth of the month". The Gemara in Taanis (29.1) states "We learn in a Braisa: It is impossible to state 'the seventh', for it is already written 'the tenth', and it is impossible to state 'the tenth', for it is already written 'the seventh'. How can it be so? At the time when he entered the Heichal... and on the ninth near dark the fire caught on, and the burning lasted the whole of the tenth day."
- 4. The city of Beitar was captured, and with it tens of thousands of Jews. There was a king among them, who many thought to be the Messiah. He was the cause of their sins and they were all killed. They were also not given the benefit of burial, and it was a great tragedy, comparable to the destruction of the Temple.
- 5. On this day, which is prepared for punishments, the wicked Turnufos Rufus plowed the area of the Heichal, fulfilling the verse: "Zion will be a plowed field".
These four fast days are mentioned in the tradition through the writing of the prophet Zecharia (8.19): "So says the G-d of H-sts: The fast of the fourth, the fast of the fifth, the fast of the seventh, and the fast of the ninth, will one day be for the house of Yehuda a time for rejoicing and happiness."
"The fast of the fourth" - this is the seventeenth of Tamuz, which is in the fourth month; "the fast of the fifth" - this is Tisha b'Av, which is in the fifth month; "the fast of the seventh" - this is Tzom Gedalia which is in the seventh month; and "the fast of the tenth" - this is the tenth of Teves, which is the tenth month. All of Israel has the custom to fast on these days.
Even though the breach of the walls of Yerushalayim during the destruction of the First Temple happened on the ninth of Tamuz, as it is written in the book of Malachim, nevertheless the fast was decreed for the seventeenth, when the walls of Yerushalayim were breached during the Second Temple period. For us the destruction of the Second Temple is more severe, for from then on we were sscattered to the four corners of the globe.
(The Beis Yosef quotes Rabbeinu Yeruchim, who writes that Gedaliah was killed on Rosh Hashana, and the memorial was pushed off to the following day (see there). Nevertheless, it does not have the status of a 'delayed fast' ('Taanis Nidcheh') in regard to the father of a boy having a Bris, since it falls out like that every year. Furthermore, it is not comparable to a delayed fast that is pushed from the Shabbos to Sunday, for in the later case all see that it is being delayed, while by the Fast of Gedaliah that is not apparent, since it falls out the same way every year. (This is as the ruling of the Taz, see there).)
In the Talmud verses from Zecharia are expounded to the effect that in the times of the Temple these day were days of rejoicing and happiness, which they will return to be in time to come, with the will of G-d.
In the time of the destruction, when the nation of Israel was engulfed in pain, one was obligated to fast. This had the status of a positive commandment of the prophets, and all of Israel had accepted it upon themselves. At a time when they were not engulfed in pain the community had the option of fasting if they chose to. Nowadays we take the position of choosing to, and all have accepted to fast these days (Tur). Certainly today there are tribulations [for the community].
Nevertheless, we have not completely accepted these days as communal fasts, to start them while it is yet day, to go barefoot, and to refrain from washing anointing, and martial relations, with the exception of the Tisha b'Av alone, for on that day troubles overwhelmed us, and it is not dependent on our choice. However, on the other three fast days we do eat the night before, and we do not observe all the other stringencies, only to fast from the morning to the evening like any fast that an individual undertakes.
Today, among our many sins we find that many are apathetic in observing these fasts, and they will have to answer for that in the future. All who are healthy are not permitted to separate themselves from the community and transgress a commandment of the prophets. If one who has to eat because he is weak should not eat a meal as on all days, only enough to provide for the upkeep of his body. So is our custom today.