Ishmaelites Or Midianites?

Q

I was studying Genesis chapter 37 and observed that Joseph’s brothers sold Joseph to the Ishmaelites (verse 26 and the end of verse 28). But there is a mention of Midianite merchants at the beginning of verse 28 and finally it seems like the Midianites are the ones selling Joseph in verse 36. I am a little confused, was Joseph sold to the Ishmaelites then sold again to the Midianites who then sold Joseph to Potiphar?

A

The Ishmaelites were descendants of Ishmael, a son of Abraham and Hagar (Genesis 16:1-16). The Midianites were descendants of Midian, a son of Abraham and Keturah, the wife he took after Sarah died (Genesis 25:1-2). Therefore the two groups were related and both being nomadic probably traveled together.

Some scholars believe the two names were used interchangeably for this reason. Others say the Ishmaelites, who were with the Midianite merchants, may have actually purchased Joseph and then allowed the Midianites, who as merchants were more experienced at the market, to sell Joseph for them. Either way, both groups were involved in the nefarious transaction.