The term גֵּר means stranger or immigrated citizen. A stranger was not a native inhabitant of a country (Ex 2:22, cf. Gn 15:13; 23:4; Ex 12:49; 18:3). The stranger had legal status as a citizen of Israel (Ex 2:49; Is 14:1; Ez 47:22) as opposed to the נָכְרִי, foreigner, and תּוֹשָׁב, a person who dwells in the land (Ex 12:45; Dt 15:3; 29:22). Although he was a citizen of Israel, the stranger is in a separate category from natural born citizens. The terminology for native born citizens is אַחֶיךָ, your brothers, and the אֶזְרָח, native-born who was “one arising from the soil” or “a free tribesman” (Dt 24:14; cf. Dt 15:7; 17:15; 18:15). 
The ethnic minority status of the stranger is only hinted at in the Hebrew Bible. Abraham (Hebrew) was a stranger among the Hittites (Gn 13:3-4). The sons of Abraham (Hebrews) were strangers in the land of Egypt (Gn 15:13; Ex 22:20). Moses (Hebrew) was a stranger in the land of the Midianites (Ex 2:22; 18:3). When David confronted the man who claimed that he killed Saul, David asked “Where are you from?” The man replied, “I am the son of an alien, an Amalekite” (2 Sm 1:13). From these examples, combined with the fact that they were not in their native land, it is reasonable to assume that the stranger was part of an ethnic minority within the nation of Israel.
The census data further indicates their minority status. Unfortunately, the census data from Numbers concerns only the fighting men of Israel and the men of Levi but do not cover the stranger. However, the census data from the United Kingdom has all three categories. David in his ill-advised census of the tribes of Israel and Judah counted 1,570,000 fighting men (1 Chr 21:5). The strangers were not included in this census because they were not “from the tribes of Israel” (2 Sm 24:2). But because the census was sinful, God slew 70,000 men, leaving a remaining 1,500,000 men (1 Chr 21:14). Solomon later completed the census and found 38,000 Levites and 153,600 strangers (1 Chr 23:3; 2 Chr 2:17). This puts the total population of male Israelites somewhere around 1,538,000. The strangers made up one percent of the total population.
Although the stranger was an ethnic minority, he was still brought into the Mosaic Covenant along with the other Israelites:
You are standing today—all of you—before Yahweh your God: Your leaders, your tribes, your elders; and your officials, every man of Israel, your children, your wives; and your stranger who is in the middle of your camp from those who chop your wood to those who draw your water. You are standing today for you to enter the covenant of Yahweh your God. (Dt 29:10-12; Personal trans.).
The passage is very clear that “all of you” are standing to enter the covenant. Moses defines the phrase “all of you” by listing all groups of people, including the strangers. Their menial labor and their last place in the list indicate their low status within the covenant community. But they were made God’s people alongside ethnic Israelites (Dt 29:13). And their participation in the covenant required them to be circumcised (cf. Ex 12:48).
The Rite of Atonement also indicates the stranger’s status as covenant member. In Leviticus 16, Moses instructed the priests on how to offer atonement “because of the impurities of the sons of Israel and because of their transgressions in regard to all their sins” (Lv 16:16). At the end of his instructions, Moses said, “You shall humble your souls and not do any work . . .. for it is on this day atonement shall be made.” The “you” is further defined as “the native or the stranger” (Lv 16:29-30).
Ugarit had a similar Liturgy for Atonement (KTU 1.40) that included the stranger (Ugaritic: gr). The text lists various sacrifices for different classes in Ugarit: men, women, and strangers.
Now we present a donkey for purification
For purification of the men [or women] of Ugarit
And atonement for the foreigner within the walls of Ugarit.
The inclusion of ethnic minorities into the community was not unheard of during the time of Moses. And since the strangers shared in the guilt of the country, it seems reasonable to conclude that they were citizens of it. And in the case of Israel, they were formally sworn into the covenant and became part of Israel.
Another evidence that the stranger was integrated into the covenant was his participation in the Assembly. The stranger was to have the same laws in the Assembly as the ethnic Israelites (Nm 15:15). However, two ethnic groups were banned from the Assembly: Ammonites and Moabites (Dt 23:3; Neh 13:1). They were not allowed in because they banded together to destroy Israel. There were two other groups that had limited access to the Assembly: Edom and Egypt. These groups were allowed in only after three generations. And God said that they were not to be abhorred or detested, implying that they were to be treated equally alongside ethnic Israelites.
Since the strangers comprised such a small minority, it would have been easy for the Israelites to abuse their power. Therefore, throughout the Mosaic Covenant, God placed several provisions to protect this group. Leviticus 19:34 gives the foundational command: “The stranger who resides with you shall be to you as the native among you, and you shall love him as yourself” (cf. Lk 10:25-37). God commanded the Israelites to show the same kind of love toward their Hebrew neighbor (Lv 19:18). God defines love by what it is not. It is not treating your neighbor unjustly (v. 15). It is not slandering (v. 16). It is not hating your brother in your heart (v. 17). And it is not taking vengeance or bearing a grudge (v. 18). God sets the example because he “shows His love for the alien by giving him food and clothing” (Dt 10:18). And in the same manner, Israel was supposed to love the stranger among them (Dt 10:19).
Part of this love was shown through the equal treatment of the stranger. Israel was not to oppress him in any way (Ex 22:20; 23:9; Lv 19:33; Dt 24:14). He was given access to a fair trial (Dt 1:16; 24:17; 27:19). The laws were to be applied equally to him (Lv 24:22; Nm 15:29). He was given equal access to the cities of refuge (Nm 35:15). And he was taught the Law of God so that he could obey it (Dt 31:12).
The stranger was usually classed alongside other poor members of the society and given access to special, state enforced social programs. Israel was to leave the corners of the field, forgotten sheaves, and the leftovers of the vineyard and olive tree for the stranger to come and gather (Lv 19:10; 23:22; Dt 24:19-21). Anything animal that died of itself was to be given (not sold) to the stranger (Dt 14:21). Every three years the Israelites were to pay a ten-percent tax of his crops for a deposit in his town. This food source was to be distributed to the strangers, among others (Dt 14:28-29). As the Israelite devoted his tenth, he was to state that he had given all of it to the needy and had not polluted it (Dt 26:10-15).
The stranger also participated in the religion of the state. He was not to work on the weekly Sabbath (Ex 20:10; 23:12). He enjoyed the feasts of the Passover, Weeks, and Booths (Ex 12:48-49; Lv 16:29; Nm 9:14; Dt 16:11, 14). He also could present burnt offerings, votive offerings, freewill offerings, and fire-offerings (Lv 17:8; 22:18; Nm 15:14-16; Dt 26:11).
The stranger was not above the law. As a covenant member, he was required to serve Yahweh alone or else face death (Lv 20:2). If he blasphemed the name of Yahweh, he was to be put to death (Lv 24:2; Nm 14:30). If he ate the blood of any animal, he was to be cut off from the people (Lv 17:10-13). Yet, if he participated unwittingly in sin, then he was forgiven along with the rest of the nation (Nm 15:26).
In sum, the stranger was a full covenant-community member but had special privileges to help him in his need. He was not allowed to be socially maligned or marginalized. Rather all of Israel was supposed to incorporate him into the nation. And if Israel treated him properly, the stranger could become wealthy and independent (Lv 25:45-47).
Based on the data, every ethnicity was equal before God. Israel had a special place in God’s plan economically. They were given more privilege than the other nations (cf. Rom 9:1ff). But ontologically, they were equal to every other nation (cf. Rom 3:23). Therefore, even in the Mosaic Covenant, God did not place other ethnicities on a lower plane than Israel. Instead, they retained their innate equality before him.
. Francis Brown, S. R. Driver, and Charles Augustus Briggs, “אֶזְרָח,” The Enhanced Brown-Driver-Briggs Hebrew and English Lexicon (Oxford: Clarendon, 1906); cf. W. Robertson Smith, Lectures on the Religion of the Semites, The Fundamental Institutions (London: Adam and Charles Black, 1894), 75–76.
. It is necessary to delineate whether the Hebrews thought of the stranger as an ethnic minority because the idea of a stranger or foreigner was relative in the ANE. Gary Beckman gives two examples of the relative nature of this idea: “in third-millennium B.C.E. Sumer, whose city-states shared a common language and religious system, the inhabitants of the city of Umma nonetheless held even the men of neighboring Lagash to be foreigners, if not so alien as the people of the Zagros mountains to the east. In contrast, most of the residents of central Anatolia during the Late Bronze Age, although belonging to diverse ethnic groups and speaking several—sometimes unrelated—tongues, were ‘men of Hatti’ (LÚ.MEŠ URUḪatti), the people we today call ‘Hittites.’” Gary Beckman, “Foreigners in the Ancient Near East,” Journal of the American Oriental Society 133, no. 2 (2013): 203.
. This understanding of the passage is consistently agreed upon by a wide variety of authors. Peter C. Craigie, The Book of Deuteronomy, vol. 5, The New International Commentary on the Old Testament (Grand Rapids: Eerdmans, 1976), 511; Edward J. Woods, Deuteronomy: An Introduction and Commentary, vol. 5, Tyndale Old Testament Commentaries (Nottingham NG, England: InterVarsity, 2008), 411; Telford Work, Deuteronomy, vol. 5, Brazos Theological Commentary on the Bible (Grand Rapids: Brazos, 2009), 432.
. The entire document lists other ethnic groups that could accuse Ugaritites of sins such as anger, impatience, or “some evil.” Then they offered the atonement with these words: “whenever your state of grace be changed / concerning the sacrifices and the offering, / our sacrifice we offer: / this is the offering we make, / this is the victim we immolate. / May it be borne aloft to the father of the gods, / may it be borne aloft to the pantheon of the gods, / to the assembly if the gods, / to Thukamun and Shanim: / here is the [sacrificial animal]. Textual critical marks removed from quotation. Nicolas Wyatt, Religious Texts from Ugarit (New York: Sheffield Academic, 2002), 342.