Fast of the Firstborn (תענית בכורות, Ta'anit B'khorot or תענית בכורים, Ta'anit B'khorim) is a unique fast day in Judaism which usually falls on the day before Passover (i.e., the fourteenth day of Nisan, a month in the Jewish calendar; Passover begins on the fifteenth of Nisan). In modern times, the fast is usually broken at a siyum celebration (typically made at the conclusion of the morning services), which, according to prevailing custom, creates an atmosphere of rejoicing that overrides the requirement to continue the fast (see Breaking the fast below). Unlike all other Jewish fast days, only firstborn children are required to fast on the Fast of the Firstborn.
This fast commemorates the salvation of the Israelite firstborns during the Plague of the Firstborn (according to the Book of Exodus, the tenth of the ten plagues wrought upon Ancient Egypt prior to the Exodus of the Children of Israel), when, according to Exodus (12:29): "...God struck every firstborn in the Land of Mitzrayim (Ancient Egypt)...."
The primary source quoted for this custom is Tractate Soferim 21:3, where it is stated that firstborns fast "in commemoration of the miracle that they were saved from the Plague of the Firstborn". Rabbeinu Asher and Rabbeinu Aharon HaKohein quote the Jerusalem Talmud as an additional source for the fast, though the same passage can also be understood to mean that firstborns do not fast.
The Shulchan Aruch records the custom of fasting, however R' Moshe Isserles records that some people instead "redeem" the fast. Later commentaries suggest that this redemption could be done by holding a siyum or by giving charity. R' Yosef Eliyahu Henkin suggests that since the custom is absent from the (Babylonian) Talmud, it is not universally binding but rather depends on current practice, allowing the current practice of replacing the fast with a siyum or charity (Henkin preferred charity).
Fasts in Judaism can have a number of purposes, including atonement for sins; commemorative mourning, and commemorative gratitude (see Ta'anit).