36 Meanwhile the Midianites who had bought Joseph had taken him to Egypt. There they sold him to Potiphar, an officer to the king of Egypt and captain of the palace guard.