The Shulchan Aruch · Orach Chayim
אורח חיים תקמ״טOrach Chayim 549
Siman 549 of 697 in Orach Chayim — 2 se'ifim
הלכות תשעה באבLaws of the Ninth of Av· siman 549
Se’if 1א׳
חַיָּבִים לְהִתְעַנּוֹת בְּתִשְׁעָה בְּאָב וּבְי"ז בְּתַמּוּז וּבְג' בְּתִשְׁרֵי וּבַעֲשָׂרָה בְּטֵבֵת, מִפְּנֵי דְּבָרִים הָרָעִים שֶׁאֵרְעוּ בָּהֶם.
We are required to fast on the 9th of Av, [and] on the 17th of Tammuz, and on the 3rd of Tishrei, and on the 10th of Teves because of the bad occurrences that occurred on those [days].
Se’if 2ב׳
אַף עַל גַּב דִּכְתִּיב בַּקְּרָא: בַּחֹדֶשׁ הָרְבִיעִי בְּתִשְׁעָה לַחֹדֶשׁ הָבְקְעָה הָעִיר (יִרְמְיָהוּ לט, ב) אֵין מִתְעַנִּין בְּט' בּוֹ אֶלָּא בְּי"ז, מִפְּנֵי שֶׁאַף עַל פִּי שֶׁבָּרִאשׁוֹנָה הֻבְקְעָה בְּט' בּוֹ, כֵּיוָן שֶׁבַּשְּׁנִיָּה הֻבְקְעָה בְּי"ז בּוֹ, תִּקְּנוּ לְהִתְעַנּוֹת בְּי"ז בּוֹ מִשּׁוּם דְּחֻרְבַּן בַּיִת שֵׁנִי חָמִיר לָן.
Even though it is written in the verse (Jeremiah 39:2) "[During the eleventh year [of the reign] of Tzidkiyahu] in the fourth month [i.e., Tammuz], on the ninth day of the month, the city was crossed", we do not fast on the 9th day of that [month], rather on the 17th of that [month] -- since, despite the fact that originally (i.e.; the First Temple) [the city of Jerusalem] was breached on the 9th of that [month] -- since the second time (i.e.; the Second Temple) [the city] was breached on the 17th of that [month], [the sages] decreed a fast on the 17th of that [month] because the destruction of the Second Temple was stronger than it (i.e; the destruction of the First Temple).
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0