Why Dathan and Abiram Perished as Korah's Neighbors

Midrash Tanchuma Buber, Korach 8:1

(Numbers 16:1:) AND DATHAN AND ABIRAM. From here they said: Woe to the wicked one, woe to his neighbor; good to the righteous one, good to his neighbor. Dathan and Abiram, who were neighbors to Korah, who was settled to the south, as it is written (Numbers 3:29), THE FAMILIES OF THE SONS OF KOHATH SHALL ENCAMP <on the side of the Tabernacle southward>. The standard of Reuben was near to them, [as it is said] (Numbers 2:10), THE STANDARD OF THE CAMP OF REUBEN SHALL BE SOUTHWARD. But the standard of Judah was in the east, and Issachar and Zebulun were with him, [as it is said] (Numbers 2:3), AND THOSE ENCAMPING EASTWARD TOWARD THE SUNRISE SHALL BE THE STANDARD OF THE CAMP OF JUDAH. And near to them were Moses, Aaron, and his sons, [as it is said (Numbers 3:38), AND THOSE ENCAMPING BEFORE THE TABERNACLE EASTWARD, BEFORE THE TENT OF MEETING TOWARD THE SUNRISE, WERE MOSES AND AARON AND HIS SONS.] Because these were near to the Torah, they therefore merited to be sons of the Torah, as it is written (Psalms 60:9), JUDAH IS MY LAWGIVER; [and it is written] (1 Chronicles 12:33), AND OF THE SONS OF ISSACHAR, THOSE HAVING UNDERSTANDING OF THE TIMES; [and it is written] (Judges 5:14), AND OUT OF ZEBULUN THOSE WHO WIELD THE SCRIBE'S PEN. But Dathan and Abiram, who were neighbors to Korah, a master of dissension, were stricken and perished from the world.

Themes

Biblical References