Tanna Devei Eliyahu (Hebrew: תנא דבי אליהו; alternate transliterations include Tana D'vei Eliyahu and Tana D'vei Eliahu) is the composite name of a midrash, consisting of two parts, whose final redaction took place at the end of the 10th century CE. The first part is called "Seder Eliyahu Rabbah" (31 chapters); the second, "Seder Eliyahu Zuṭa" (15 chapters).
This midrash is referred to in the Talmud:
Elijah used to come to R. Anan, upon which occasions the prophet recited the Seder Eliyahu to him. When, however, R. Anan had given this decision [one previously narrated in the Talmud] the prophet came no more. R. Anan fasted in consequence, and begged forgiveness, whereupon the prophet came again; but R. Anan had such great fear of Elijah that, in order to avoid seeing him, he made a box and sat in it until the recitation of the Seder was finished. And this is what is meant by Seder Eliyahu Rabbah and Seder Eliyahu Zutta.
Regarding the last line, Rashi explains that "Rabbah" refers to what was taught before this incident ("outside the box") and "Zutta" to what was taught after the incident ("inside the box").
Anan was a Babylonian amora of the 3rd century. The collection of baraitot concerning him, referred to in this midrash, is cited in the Babylonian Talmud under the title "Tanna debei Eliyahu" (see below), and the utterances in question are found in the midrash itself. Tosafot say that the midrash consists of a large book and a small one. R. Nathan ben Jehiel says: "The midrash contains baraitot which the prophet taught to Anan, and consists of two parts, a large seder with 30 chapters, and a small seder with 12 chapters; and all of the Tanna debe Eliyahu cited in the Talmud is to be found in these baraitot." The inner connection between these two midrashim is a loose one, and it is only in sections 5 to 10 that the second refers to the first.
The underlying theme of the Tanna debe Eliyahu, which (with many interruptions) runs through the whole work, is the evolution of the world-system. The midrash calls the single periods of the history of man "shittot" (series). The first series, which deals with the beginning of the world and extends to the moment when man was driven out of Eden, consists of two subsections, (a) "Ma'aseh Merkabah" and (b) "Ma'aseh Bereshit." The six series of the world-system, however, were created in the divine mind even before any being, with the exception of Israel, existed. They were:
Even before these six foundations, however, Israel was, as stated above, already in being in the divine mind, because without Israel there could have been no Torah.: 161 
The second series embraces the period from the expulsion of man from Eden to the Flood. In the ten generations from Adam to Noah man did not adhere to "meekness," did not do what was right,: 80 but fell lower and lower until he practiced violence, theft, immorality, and murder. For this reason his destruction became a necessity.
The third series extends from the Flood to King Manasseh of Judah. It treats of the time of the study of the Law, of the priestly office, of the kingdom, and of the end of Israel's prosperity through the evil administration of Manasseh. In the days of Abraham the period of "tohu wa-bohu" (confusion) ceases and the 2,000 years of law begin. This time is divided into the following periods:: 108
The fourth series is filled with "meekness" (ib. p. 163). Whoever studies the Torah receives "meekness" as a reward. In addition there is a second recompense, which is the Mishnah. In this introduction of the Mishnah there is a trace of apology intended for those who believe that only the Torah was delivered on Mount Sinai.
The fifth series extends from King Manasseh to the building of the Second Temple.: 163
The last series treats of the future. God, surrounded by all the saints, sits in His beit midrash and counts up the generations of the different periods of time, what they have learned, and what reward they shall receive for it. The future of these saints will be like the beginning of the life of man (ib. p. 164).
These six series are again divided into three main periods: (1) the present world; (2) the Messianic period; and (3) the future world. These are subdivided into: (a) 2,000 years of confusion ("tohu"); (b) 2,000 years of the Torah; (c) 2,000 years of the Messiah; (d) inauguration of a general peace; (e) the future world.: 115
Besides this fundamental idea both parts of the midrash emphasize the importance of virtue, of a religious life, and of the study of the Law, and exhort to repentance and almsgiving, greater tolerance toward both Jews and non-Jews, diligent study and respect for scholars, modesty and humility, and the avoidance of non-Jewish manners and customs. The midrash, further, attempts to prove that all human life is based on the two extremes, toil in the sweat of the brow, and the regaining of the freedom of the soul. Hence it begins with the expulsion of Adam from Eden (Gen. 3:24), and closes with the same theme. The cherubim in Eden are identified with man, and are the symbol of the reward of well-doing; the flaming sword is hell, the punishment for evil-doing. The way to the tree of life is said to be "derekh eretz" (good behavior), while the guarding of the tree of life is like the guarding of the word of God.
By derekh eretz the midrash understands that which is fitting, useful, and honest; and these three qualities are the fundamental principles upon which the human world-system and society rest. An example of derekh eretz in this midrash is the following: The Philistine princes possessed derekh eretz, because when the Philistines wished to convey the Ark to the Israelites they would not send it back without sacrifices. On the other hand, the inhabitants of Beit Shemesh did not possess it, inasmuch as instead of bowing before the Ark they rejoiced and danced before it boldly, so that misfortune came upon them and 50,000 of them fell.
The opposite of derekh eretz is "to walk in the crooked way," i.e., to do unworthy deeds and to give oneself up to immorality. Yet no nation of the world, with the exception of Ancient Egypt, has sunk so low as this. In ordinary life, however, the transgression of a command or prohibition, indecency, or even theft is a most pronounced opposite of derekh eretz; and every father of a family should strive to preserve those depending on him from these vices, because they belong to those evils which might bring about the destruction of the world.
The twelve chapters of Seder Eliyahu Zutta are characterized by the fact that the narratives showing why in this world things often go amiss with the good and well with the wicked, are commonly introduced by the words "It happened" (מעשה) or "Once on a time" (פעם אחת). The midrash is sometimes interspersed with very beautiful prayers (see, for example, M. Friedmann, l.c. pp. 6, 18, 19, 28).
The Tanna debe Eliyahu is the only aggadic work which contains a rabbinic-karaitic polemic. In chapter 2 of Seder Eliyahu Zutta is an account of a meeting of the author with a Karaite, who possesses a knowledge of Jewish Scripture, but not of the Mishnah; the differences discussed, however, are not important. The polemical attitude is much more noticeable in chapter 15 of the first part. There the following points are treated in detail:
Unlike other polemics, this one is not couched in acrimonious terms, but it adopts a mild, conciliatory tone.
Scholars agree that the work was composed around the end of the 10th century. However, opinions differ as to where it was written. Whereas certain scholars (e.g., Zunz, J.L. Rapoport, W. Bacher, Oppenheim, and Hochmuth) suppose Babylonia or Palestine, Güdemann is of the opinion that the work was written in Italy, or at least that its author must have been an Italian who had traveled a great deal and had been as far as Babylon, who learned there of the polemic between the Rabbanites and Karaites, but who abstained from mentioning Europe or Italy because he considered he would be likely to create a greater impression among his fellow countrymen by relating observations which he had made abroad.
Furthermore, the fact that he knew nothing of Babylonia beyond its name shows that he could not have been a native of that region. Derenbourg also places the origin of the work in Rome. H. Grätz goes farthest of all, by simply identifying the Babylon of the midrash with Rome, and the fights of Gog and Magog described in the work with the devastating invasion of the Hungarians into Italy from 889 to 955. The most radical opponent of this view is M. Friedmann. For him all arguments concerning the age of the Tanna debe Eliyahu and against its identification with the "Seder Eliyahu" mentioned in Ket. 10b, are only superficial and only apparently sound; and he accordingly assigns the origin of the work "eo ipso" to Babylonia.
The age of the midrash can be estimated from three data contained in the book itself.
The especially original midrashim in the work include the following.
The passages in the Talmud cited under "Tanna debei Eliyahu" and found in this midrash are: Shabbat 13a; Pesachim 94a, 112a; Megillah 28b; Kiddushin 80b; Avodah Zarah 5b, 9a; Sanhedrin 92a; Tamid 32a.
Those cited in the Talmud under "Tanu Rabbanan" and found also in this midrash are: Shabbat 88b and Gittin 36b = Tanna debei Eliyahu (ed. Friedmann), p. 78; Pesachim 49a = ib. p. 30; Pesachim 49a = ib. p. 61; Sukkah 52a = ib. p. 20; Rosh Hashana 18a = ib. p. 53; Megillah 14a = ib. p. 82; Kiddushin 82a = ib. p. 101; Bava Kamma 97b = ib. p. 21; Bava Batra 90b = ib. p. 77; Bava Batra 147a = ib. p. 157; Sanhedrin 29a = ib. p. 147; Sanhedrin 43b = ib. p. 102; Sanhedrin 109a = ib. p. 158; Shevuot 39a = ib. p. 132; Yevamot 62b = ib. p. 78.
Furthermore, in this midrash are found sentences of the following amoraim: Johanan, Joshua ben Levi, R. Abbahu, and Eleazar.
The first published edition of this midrash appeared at Venice in the year 1598, prepared from a copy dated 1186. In 1677 an edition by Samuel b. Moses Haida, with changes in the text and with a commentary (דאשא זקוקין דנורא בעורין), appeared in Prague. The text itself was presented in a "nusḥa ḥadasha" (new text) and in a "nusḥa yeshana" (old text), being wholly distorted from its original form by Talmudic and cabalistic interpolations. This edition consists of three parts, the first two of which contain the text of the Rabbah and the Zuṭa (31 and 29 chapters respectively). These two parts are preceded by prefaces bearing the titles "Mar Ḳashshisha" or "Sod Malbush ha-Neshamah" (Mystery of the Clothing of the Soul) and "Mar Yanuḳa" or "Sod Ḥaluḳa de-Rabbanan" (Mystery of the Clothing of the Rabbis). Then follows an introduction (common to part 2 and part 3), with the title "Sha'ar Shemuel" (Gate of Samuel), and a third part consisting mainly of an exegesis of chapter 20.
The following editions are specially to be recommended, namely: that by Jacob ben Naphtali Herz of Brody, with a commentary, Yeshu'at Ya'aḳob (Zolkiev, 1798); that by Abraham ben Judah Löb Schick, with the commentary Me'ore Esh (Sidlkov, 1835); that by Isaac Elijah ben Samuel Landau, with a commentary, Ma'aneh Eliyahu (Wilna, 1840). Among the best editions is the Warsaw one of 1880 containing both texts. The latest edition (prior to 1906) appeared in Vienna in 1900 and 1903, under the titles Seder Eliyahu Rabbah and Seder Eliyahu Zuṭa, after a Vatican manuscript of the year 1073, critically revised, and with a commentary entitled Me'ir 'Ayin, and a voluminous introduction by M. Friedmann. In this edition Seder Eliyahu Zuṭa is divided into 15 chapters.
An English version was translated by William G.Braude and Israel J.Kapstein in 1981 (cf. recension in Recherches de science religieuse, 1982, p. 553) and more recently by Rabbi Avraham Yaakov Finkel in 2013.
This article incorporates text from a publication now in the public domain: Singer, Isidore; et al., eds. (1901–1906). "TANNA DEBE ELIYAHU". The Jewish Encyclopedia. New York: Funk & Wagnalls.