A well-known tradition has it that King David died on the festival of Shavuot. The story of his death is discussed by amoraim in both Israel and Babylon, though in significantly different ways. While only the sources in the Talmud Yerushalmi record this specific tradition, the Talmud Bavli’s sources shape the story of David’s death in ways significant to Shavuot in their own right.
The death of King David is described by Ruth Rabbah (3:2), in the context of an imagined conversation between David and God. The conversation is based on Psalms (39:5): “Tell me, Lord, what my term is, what is the measure of my days; I would know how fleeting my life is.” The Midrash understands this verse as David asking God when he will die. After a back-and-forth, God informs David that he will die on Shabbat. David requests that his death be moved to the next day but is denied, because his son’s reign was already decreed to have begun. He then requests an earlier death but is again denied, this time because God would not miss a day of David’s songs, which God prefers to the sacrifices that Solomon would offer. His petitions rejected; David dies on a Shabbat that is also Shavuot.
The Bavli contains a parallel tradition, recorded in a derashah by Rabbi Tanhuma bar Abba, differing from Ruth Rabbah in several ways. In particular, David’s petition to die a day earlier is now rejected not because God prefers his songs to Solomon’s sacrifices, but because God prefers the Torah that Solomon studies.
In addition, David’s death occurring on Shabbat takes on added significance; Rabbi Tanhuma describes how the Angel of Death was at first unable to harm David, who was protected by the Torah he constantly studied every Shabbat. Finally, the Angel of Death figures out how to generate a distraction that interrupted David long enough to take his life. Rabbi Tanhuma’s version of the story connects David with an already familiar motif in the Bavli, according to which certain rabbis were protected from death because of the torah they constantly studied.
These changes fit the substance of Rabbi Tanhuma’s discourse, which centers around Ecclesiastics 9:4, “for a living dog is better than a dead king.” His overall thesis is that this is so because the living have the ability to study Torah, while the dead do not, and his story of King David’s death is only one part of his argument. That said, both the Bavli and Yerushalmi describe King David as a dedicated Torah scholar – for example, by waking up in the middle of the night to devote the early morning hours to the study of Torah. They both also describe David teaching Torah to the people, ruling on halakhic questions, and performing other characteristically rabbinic activities.
Interestingly, it is the Palestinian sources – the Yerushalmi and Ruth Rabbah – that do not emphasize David’s Torah study, especially since they are the ones who identify the day of his death as Shavuot. Rabbi Tanhuma who does emphasize his study of Torah, merely places his death on Shabbat, not Shavuot. This seems a bit counterintuitive – from a literary perspective, it would make sense to associate David’s dedication to Torah study to Shavuot.
In this context, though, we should remember that the Bavli records an unresolved dispute as to whether the revelation at Sinai actually took place on the 6th or 7th of Sivan – and whether, therefore, Shavuot actually commemorates the anniversary of the giving of the Torah. In fact, Shavuot is first formally described as “Z’man Matan Toratenu” in the 9th century Siddur of Rav Amram Goan. However, in the same sugya, Rava teaches that the consensus position is that, whatever the day of the month, the giving of the Torah certainly took place on Shabbat. In other words, the giving of the Torah – and certainly the public teaching of Torah – was associated by Chazal with Shabbat before it was associated with Shavuot.
It is certainly plausible, therefore, that the traditions that frame David as a Torah scholar as well as the traditions that place his death on Shabbat developed together. At the same time, a somewhat independent tradition might have associated the birth (and therefore death) of David around Shavuot – not based on David’s identity as a Torah scholar, but based on the Shavuot tradition of reading of the Book of Ruth, which concludes with the tracing of David’s lineage. Over time, as Shavuot became less about the agricultural cycle of the land of Israel following the Roman destruction and occupation of Jerusalem, and more about celebrating the giving of the Torah at Sinai, these overlapping traditions could well have merged into each other.
Indeed, it is even possible that the motif of King David as Torah scholar, itself a creative rabbinic development, could have helped facilitate the rabbinic understanding of Shavuot itself from Yom HaBikkurim into Z’man Matan Toratenu. As the rabbis redefined the focus of the festival in the wake of the cessation of the Temple service and the national life that revolved around it, their conception of King David, who already loomed large over Shavuot, led the way.
Rabbi Avraham Bronstein is rabbi of The Hampton Synagogue (Westhampton Beach, NY)
 Yerushalmi sources of this tradition, Betzah 2:4, Chagigah 2:3
 As the Midrash continues, it becomes clear that the reason David did not want to die on Shabbat, even proposing an earlier death for himself, is that dying on Shabbat would awkward halakhic questions regarding the care of his body, which could not, despite the inherent indignity, be moved until nightfall.
 Joseph Heinemann (“On Life and Death – Anatomy of a Rabbinc Sermon,” Scripta Hierosolymitana 27 (1978), 52-65) assumes that the story in Ruth Rabba came first, while Gilead Sasson (“King David, the Dogs, and the Lions,” Bar Ilan University’s Parashat Hashavua Study Center, May 23, 2007) assumes that the story in the Bavli came first.
 See Bava Metzia 86a (Rabba bar Rav Nachman) and Moed Katan 28a (Rav Chisda)
 Berakhot, Bavli 3b, Yerushalmi 5b
 For a review of these sources and an exploration of some of the motivation behind this motif, see Itamar Wahrhaftig (“King David, Sovereignty, and Torah,” Bar Ilan University’s Parashat Hashavua Study Center, May 29-30, 2009).
 Shabbat 86b. Though Pesachim 68b does cite Rabbi Elazar who does state affirmatively that the Torah was given on Atzeret (Shavuot).
 See David Glasner, “Was the Torah Really Given on Shavuot?,” http://www.jewishideasdaily.com/6492/features/was-the-torah-really-given-on-shavuot/
 Rabbi Shlomo Zevin (“Moadim BaHalakhah”) cites Tevu’ot Shor, who explains that we read the Book of Ruth on Shavuot because of the tradition that the righteous are born and pass away on the same day. Since we know that David died on Shavuot, we read of the backstory of his birth, which would have taken place on the same day. In contrast, I am arguing the opposite – since the Book of Ruth, which is read on Shavuot because it is set during the time of the wheat harvest, mentions the birth of David, the Yerushalmi assumes he died on that day as well.