In the early days of our language, in the times that we call Old English, the word “neighbor” was a compound word, made up of the two elements, neah and gebur.
These separately have descended to us as “nigh” and “boor,” and that is exactly what neighbor originally meant, a nearby rustic or peasant, a husbandman dwelling nearby.
From the origin it would appear, therefore, that the term applies only to countryfolk and to small villages, but it was early taken into the towns and cities and applied to anyone who lived nearby.