Babylonian Talmud, Bava Metzia 71a
If you lend money to any of My people that is poor by you: [this teaches, if the choice lies between] my people [Jews] and a heathen [non-jew], 'my people' has preference; [between] the poor and the rich—the 'poor' takes precedence; [between] your poor [your relatives] and the [general] poor of your town—your poor come first; [between] the poor of your city and the poor of another town—the poor of your own town have prior rights.