“A prophet from your midst” (Dt.18:15)—
but not from beyond the Land.
“From your brothers” (Dt.18:15)—
but not from [the gentile] others.
“Shall HASHEM your God raise up for you” (Dt.18:15)—
but not for gentiles.
Then, how do I explain this:
“I have appointed you a prophet to the gentiles” (Jer.1:5)?
[This refers to Israelites] who act like the gentiles.
“To him shall you listen” (Dt.18:15)—
even if he commands you to transgress
one of the commandments stated in the Torah—
like Elijah on Mt. Carmel—
for the time being, obey him.