Did you read the passages about how God divided up the land when the Israelites entered the promised land?

Are you aware that the word translated "stranger" in the KJV literally means alien? Frankly, God made a pronouncement in the text you quoted which is condemned as too liberal in today's American context; that aliens should have the same legal rights as citizens.