TT #22 · Parshas Vayeishev · Passuk 37:36
The Midianites, meanwhile, sold him in Egypt to Potiphar, a courtier of Pharaoh and his prefect.
Torah Temimah points to Sotah 43a / Pinchos and Midyan.
Sefaria — Sotah 43a / Pinchos and Midyan
“And the Midyanim sold him” — it was taught: not for nothing did Pinchos go to war against the Midyanim, but to settle the account of his mother’s father, as it is stated: “And the Midyanim sold him.”
Category D — Conceptual / historical / causal inference.
Method — The Gemara explains that Pinchas later went to war against Midyan to settle the account of Yosef’s sale, since the Midyanim were involved in selling him. The earlier event is presented as the reason for the later campaign.
Textual trigger — “Ve-ha-medanim machru oto el Mitzrayim” in Bereishis 37:36, used to explain Pinchas’s later war against Midyan.
Pinchos’s campaign against Midyan is framed as paying out the injustice of Yosef’s sale by Midyanim.