37:28ל״ז:כ״ח
1 א

ויעברו אנשים מדינים - ובתוך שהיו יושבים לאכול לחם ורחוקים היו קצת מן הבור לבלתי אכול על הדם וממתינים היו לישמעאלים שראו וקודם שבאו הישמעאלים עברו אנשים מדינים אחרים דרך שם וראוהו בבור ומשכוהו ומכרוהו המדיינים לישמעאלים. ויש לומר: שהאחים לא ידעו ואף על פי שכתוב אשר מכרתם אותי מצרימה. יש לומר: שהגרמת מעשיהם סייעה במכירתו. זה נראה לי לפי עומק דרך פשוטו של מקרא. כי ויעברו אנשים מדינים משמע ע"י מקרה והם מכרוהו לישמעאלים. ואף אם באתה לומר וימכרו את יוסף לישמעאלים כי אחיו מכרוהו, אם כן צריך לומר שהם ציוו למדינים סוחרים למושכו מן הבור, ואח"כ מכרוהו לישמעאלים.

ויעברו אנשים מדינים, while the brothers had been sitting down to consume their meal, having distanced themselves somewhat from the pit into which they had thrown Joseph in order not to be guilty of “eating while spilling blood,” they were waiting for the Ishmaelites whom they had seen in the distance, to arrive. During this period the Midianites, coming from a different direction had passed there, saw Joseph in the pit, pulled him up, and proceeded to sell him to the Ishmaelites. One may assume that the brothers had no knowledge of this. Even though the Torah appears to attribute the sale of Joseph to the Ishmaelites to the brothers, (based on Joseph accusing them of having sold him to Egypt, 45,4) we would have to say that because of their having been instrumental in bringing about that sale they are considered as if having assisted in that sale. This appears to me the deeper meaning of the plain meaning of the text both here and in chapter 45. The line describing the Midianites passing that way is described as something totally coincidental, having nothing to do with what the brothers had planned to do with Joseph. Even if the Torah says:וימכרו (את) יוסף לישמעאלים, this sounds as if the brothers did the selling. It is also possible that the brothers noting the Midianites suddenly materialising out of nowhere, instructed them to pull Joseph out of the pit after which they themselves sold him to the Ishmaelites.