In the Tanakh, the term "the people of the land" (Hebrew am ha'aretz) refers to a special social group or caste within the kingdom of Judah. Among the activities of the biblical am ha'aretz was the revolt against Athaliah. By contrast, the plural ammei ha'aretz or ammei ha'aretzot refers to foreigners, either the nations of the world (gentiles) or the native Canaanite population living within Eretz Yisrael.
In the Second Temple period, the "people of the land" (am ha'aretz) are contrasted with those returning from the Babylonian captivity, "Then the people of the land weakened the hands of the people of Judah, and troubled them in building". It is unclear whether the term refers to the people of Judah who remained behind and adopted syncretistic views, or to non-Hebrews. Rubenstein (2003) considers that in Ezra and Nehemiah it designates the rural Jews who had remained in the land while the aristocratic and priestly classes were deported to exile in Babylonia. In the view of Kartveit (2009) the terms used in Ezra and Nehemiah may not be precise in their distinctions; there may be implication that the "people of the land" (Ezra 4:4) had intermarried with the "peoples of the lands" (Ezra 9:1 ammei ha'aretzoth), and there may be an equation or relation with the origin of the Samaritans.
Usage of the term am ha'aretz in the Hebrew Bible has little connection to usage in the Hasmonean period and hence in the Mishnah. The Talmud applies "the people of Land" to uneducated Jews, who were deemed likely to be negligent in their observance of the commandments due to their ignorance, and the term combines the meanings of "rustic" with those of "boorish, uncivilized, ignorant".
The am ha'aretz were of two types, the am ha'aretz le-mitzvot, Jews disparaged for not scrupulously observing the commandments, and the am ha'aretz la-Torah, those stigmatized as ignoramuses for not having studied the Torah at all.
The am ha'aretz are denounced in a very late and exceptional passage in Talmud Bavli Pesahim 49, where they are contrasted with the chachamim ("wise") and talmidei chachamim ("wise students", i.e. scholars of the Talmud). The text contains the rabbinical teaching that no man should marry the daughter of an am ha'aretz because if he should die or be exiled, his sons will then also be ammei ha'aretz (see Jewish matrilineality). A man should rather sell all his possessions in order to afford marriage to a daughter of a talmid chacham. Marriage of a talmid chacham to a daughter of an am ha'aretz is compared to the crossbreeding of grapevine with wild wine, which is "unseemly and disagreeable".