I. When Eldad and Medad prophesied that Moshe would die and Yehoshua would take over, Yehoshua complains to Moshe:

וַיַּעַן יְהוֹשֻׁעַ בִּן נוּן מְשָׁרֵת מֹשֶׁה מִבְּחֻרָיו וַיֹּאמַר אֲדֹנִי מֹשֶׁה כְּלָאֵם (Bamidbar 11:28)

Here's what Rashi writes:

הטל עליהם צרכי צבור והם כלים מאליהם (ספרי) ד"א תנם אל בית הכלא לפי שהיו מתנבאים משה מת ויהושוע מכניס את ישראל לארץ

However, jail is only the second interpretation, and the Ramban writes the following:

ולכך אמר לו "כלאם" כי אולי רוח שקר בפיהם או רוח רעה מבעתם והנה צריכין לשומם בבית הכלא כאיש משוגע ומתנבא

This is not imprisonment, but institutionalization.

II. After typing the above, I found that Rabbi Meir Blumenfeld (1900-1980. Rabbi of Newark, NJ. Prolific and well respected as a "gaon") dealt with this very question here. His understanding of the above Rashi, is based on the Ramban- that it wasn't imprisonment but commitment. He list several other possible places in תנ"ך that may seem to refer to imprisonment, but rejects them all.

Nevertheless, he does mention instances of imprisonment in halacha. For example, a murderer who kills without witnesses or warning (התראה), is imprisoned (Sanhedrin 81b). A person may also be sentenced to prison if they repeatedly transgress certain prohibitions.

Ephraim
  • 2.4k
  • 14
  • 16