For some time it has been the consensus among historians of early Israel that the thoroughgoing conquest of Canaan and resulting tribal domains described in the Book Joshua was anachronistic—a projection onto the past of a geographical state of affairs that existed only after the monarchy had defeated the Philistines and the Israelite population had expanded from their original hill territory to the lowland areas of Canaan. The first archaelogical appearance of Israelite villages in the central highlands of Canaan was in the late 13th century BCE; these areas remained their main strongholds for some two centuries until their increased numbers and the establishment of the monarchy under David enabled them to contest control of the fertile lowlands.
Some historians, like Norman Gottwald, suggest the Israelites—rather than infiltrating Canaan from the outside—were predominantly inhabitants of Canaan itself who moved to the central highlands of Palestine for relative freedom. He originally developed this thesis—which we will consider shortly—at length, in his 1979 book The Tribes of Yahweh: A Sociology of the Religion of Liberated Israel 1250-1050 B.C.E.
Canaan itself had become ethnically Hebrew over a century before Israel and the religion of Moses made their appearance in the historical record ca. 1200 BCE.  So the Israelites in the central Canaanite highlands were of essentially the same stock as the lowland population from which most of them fled.
The name ҅Abiru (“Habiru”) or ҅Apiru (“Hapiru”), etymologically closely related to “Hebrew,” was mentioned in royal chronicles through most of the 2nd millennium BCE throughout most of western Asia, and originally used as a general term for unruly subject populations. By the late 2nd millennium in Canaan, it had taken on a more specific ethnic connotation, being used as a derogatory term for the subject peoples—in a near-constant state of rebellion—of the Canaanite city-states and their Egyptian overlords. 
The Amarna letters preserve 14th century BCE correspondence between Canaanite kings and Pharaoh, which refer both to the imposition of forced labor on the Habiru and uprisings by the latter. “Let the king, my lord, learn that the chief of the Hapiru has risen (in arms) against the lands which the god of the king, my lord, gave me; but I have smitten him.” 
Gottwald, summarizing his original thesis much more concisely twenty years later in The Politics of Ancient Israel, argues that the origin of Israel lay, not in an exodus from Egypt (with a subsequent return to the ancestral homeland of Palestine) per se, but rather in a revolt by peasants living in Canaan against their Egyptian overlords.
From about the late 13th century BC, and for two centuries until the founding of the monarchy, according to Gottwald,
archeology reveals a proliferation of small agrarian/pastoral villages in the Canaanite highlands in the areas extensively referred to in the biblical traditions as settled by Israelites. While nothing in the remains “proves” that these were Israelite settlements, it is a sound inference that it was this region and its populace that formed the demographic and material resource base of the first Israelite state. The predominance of clusters of single-family dwellings, together with an absence of fortifications and public buildings, suggests local social organization intent on adaptation to a marginal environment for subsistence farming and herding. 
Archaeological surveys indicate that there were rather different ecologies and settlement patterns in the central highlands of Ephraim and Manasseh, in contrast to the southern highlands of Judah. Of the two regions, Judah was more isolated topographically and had a smaller population and a stronger pastoral economy. This differentiation tends to support a number of indications in the biblical traditions that Judah stood apart from the cooperative arrangements among the other tribes until late in the tribal period or possibly even as late as the reign of Saul. 
The children of Israel abandoned the fertile lowland areas to evade Canaanite, Egyptian or Philistine rule and the exactions of landlords. And the technologies they adopted—contour plowing to make the most of hillside terrain and cisterns to supply irrigation water where it was not naturally plentiful—were classically Zomian. These technologies enabled the Israelites to thrive on marginal land, beyond the reach of the lowland authorities “chariots of iron.” Nahum Sarna—who argues strenuously for the traditional view of Israel’s origin in the conquest of Canaan from across the Jordan—nevertheless writes:
Archaeology has certainly demonstrated that at the close of the late Bronze Age and in the early Iron Age completely new phenomena appeared in the hill country of Canaan. Hundreds of new village settlements can be identified, most of them founded in hitherto unoccupied areas. This expansive development was made possible by important technological innovations. One was the widespread use of cisterns hewed out of the rocky soil, which served to catch and collect rainwater…. The other development was the intensive farming of the sloping hillsides by means of terracing, the grading of the rugged terrain into a series of more or less level areas….
There is no doubt that this very significant shift in the settlement pattern of Canaan is to be attributed to the arrival of newcomers. 
The lowland and hill populations of Canaan, respectively, are perfect illustrations of James Scott’s concepts of legibility/governability and their opposite. In contrast to the lowland population of Canaan, which was subject to strong political control either by local city-states or their Egyptian overlords,
[t]he more remote highlanders, off the main trade routes and without abundant resources, were both less attractive and less vulnerable to direct Egyptian intervention. Instead, the city-states’ rulers, already prone to fighting among themselves, had a stake in dominating the highland populace that was being enlarged by people fleeing difficult conditions in the city-states. Because of their disunity, however, the city-states were limited in their efforts to pacify and impose tribute on the highland settlements. A military and political vacuum was thus created in which the highlanders might astutely cooperate to keep both the Egyptians and the city-states at bay.
From the Israelite perspective, the immediate threat from the city-states, themselves vassals of Egypt, overlapped with and was driven by the more distant threat from Egypt, inasmuch as both the city-states and Egypt pursued tribute-demanding policies that struck at the heart of the independent livelihood of free agrarians and pastoralists in the highlands. Eventually this Egyptian-Canaanite dominion was taken over by the Philistines, who came to ascendancy on the southwest Palestinian coast in the early twelfth century and extended their control over the old Canaanite city-states during the following century and a half. In a sense, then, the Israelites faced a hegemonic threat that was conceived as embracing Egyptian, Canaanite, and Philistine components, shifting variously according to the balance of power among these centralized states and city-states. 
The bondage-exodus theme which occupied such a central place in the Israelite religion probably involved telescoping together the oppressive authority of the native Canaanite polities and the Egyptian empire.
In terms of the formation of early Israelite tradition, what appears to have happened is that all these hostile relations with Egypt and Egyptian surrogates in Canaan were condensed and projected into the paradigm of a single mass deliverance from Egypt. Admittedly, this hypothesis about the generative matrix for the bondage-exodus themes does not exclude the possibility that some group or groups within Israel had been in Egypt. It is rather to say that the formulation of the themes need not have been dependent on any actual Israelite presence in Egypt, which in any case continues to be undemonstrable. 
We can see the same kind telescoping behind the geneological treatment of Canaan as the son of Ham, likely reflecting the hegemonic position of Egypt in Canaan at the time of the source tradition’s origin. And it’s entirely plausible that the Exodus scenario’s identification of the oppressive authority from which the children of Israel had escaped with Egypt was heavily colored by Egypt’s military involvement upholding its rule in Canaan. The Merneptah stele mentions a campaign in which that pharaoh, faced with local revolts that threatened Egyptian rule in Canaan, defeated the forces of Ashkalon, Gezer, Yanoam and Israel. 
Gottwald’s description of the “counter-society,” or “more egalitarian free peasant society,” that emerged in the highlands of Canaan sounds a lot like James Scott’s description of Zomian society:
…an alternative society of independent farmers, pastoral nomads, artisans, and priestly “intellectuals” who were free from the political domination and interference of the hierarchic city-states that held the upper hand in Canaan…. This counter-society had to provide for political self-rule, economic self-help, military self-defense, and cultural self-definition, which gave to its religion… a very prominent role as an alternative ideology for understanding the legitimacy and efficacy of its revolution. 
It was a society with no king, no landed nobility, and no tax collectors, in which “they shall sit every man under his vine and under his fig tree; and none shall make them afraid….”
The Israelite confederacy was probably drawn from a diverse population of runaway peasants and slaves in the Canaanite lowlands and assorted tribal elements (nomadic and otherwise) from across the Jordan. There are, for example, hints of Midianite or Edomite origins either for the tribe of Judah or for the cult of Yahweh, including Moses’ conversion by Jethro, the high priest of Yahweh in Midian. Caleb, Josha’s co-commander from the tribe of Judah, is described as a Kenezite—i.e., a member of a clan listed among the eponymous descendants of Edom in Genesis. The term “Benjaminites” was apparently used as a synonym for “Bedouin” by states throughout the Levant in the 2nd millennium.
The Israelite foundational myth, in which the Israelites and other Greater Hebrew peoples (Moabites, Edomites, etc.) shared a common descent from Eber, but themselves comprised a confederacy of tribes descended from twelve eponymous sons of Israel, is fairly typical among tribal confederacies in non-state spaces that share common cultural roots with neighbors in lowland states.
The legends, rituals, and politics of hill societies can be usefully read as a contentious dialogue with the valley state that looms largest in its imagination. The closer and larger that state, the more of the conversation it will usurp. Most of the origin myths of hill societies assert a hybridity or connection that implies kinship. In some cases a stranger/foreigner arrives and forms a union with an autochthonous woman. Their joint progeny are this hill people. In other legends, hill and valley people are hatched from different eggs—of the same parentage—and are, hence, brother and sister. Already, a certain original equality between highland and lowland becomes part of the narrative. 
The Miao Rebellion of Guizhou province in the 19 th century involved a broad coalition of oppressed elements among the settled state population and stateless populations in marginal areas, united by a millenarian religious ideology. It was probably about half ethnically Han (including disgraced Han officials and other dissident elements of the settled population) and ethnic hill minorities.  In the Dieu-python Rebellion of the Vietnamese Central Highlands in 1937, likewise,
[w]hat took the French utterly by surprise was the pronounced multiethnic character of the uprising and its shared cosmology. Colonial ethnographers had invested great effort in cataloguing the different “tribes” of the Central Highlands, and the idea that these disparate peoples (some of whom were nominally Catholic!) would actually share a mobilizing cosmology was both astounding and troubling. 
The Israelite tribal confederacy and the myth of eponymous founders constructed around it are thus examples, in Gottwald’s terminology, of “retribalization.” The Canaanite highlands, settled by a disparate population of refugees from the lowland city-states, “did not have a single preexistent social organization but developed their own by building on the kinship ties of various immigrant groups and improvising additional social networks as needed.”  Gottwald draws parallels to other “improvised” or “jerry-built” tribal confederacies like
the improvisational social organization of the Plains Indians, who formed “composite tribes” out of peoples of diverse backgrounds, though sometimes of the same linguistic stock, who migrated from the eastern woodlands and the western Great Basin in order to develop an equestrian bison-hunting political economy that reached its peak from 1750 to 1850. Although weak in clan and lineage structure in some instances, these tribes were bound by ceremonial, social, and military sodalities and led by shifting chieftainships. 
(It’s worth noting in passing that the Lakota and Oglala, who basically moved to marginal areas in the Plains and adopted equestrian bison-hunting after getting their butts kicked in the Great Lakes area, are themselves an excellent example of a Zomian people.)
Put all this together, and we have an early Israelite religion which amounts to an inversion of the lowland Canaanite religion and reconstruction of it around the themes—naturally enough for a marginal population composed largely of runaway slaves, serfs and debtors—of bondage and exodus.
The fundamental substratum of the Israelite religion was the Canaanitic El cultus, with El as the patriarch of a pantheon of gods. El—the generic Ugaritic-Hebrew term for “god,” converted into a proper name—remained the name for the Israelite god in the E Document, along with many of the same epithets (most notably El Shaddai ) and holy sites (e.g. Bethel and its bull cult  and the El Berit—“God of the Covenant”—cult at Shechem ) associated with him in the original Canaanite religion. El was also traditionally depicted as seated on a cherubim throne, which should strike a familiar chord with students of the Bible,  and is frequently also depicted as dwelling in tents or tabernacles, presiding over assemblies of the Gods (any similarity to the opening scene in the Book of Job is purely coincidental, of course).  The Israelite polity that emerged from 1200 BCE on was an amphictyony (a league or federation of tribes sharing a common religion and participating in periodic rituals at common holy sites, like the Delphic amphictyony in Greece) centered on the Israelite version of the El cultus, sharing many of the same holy places (again most notably Bethel and Shechem, with the addition of Shiloh as the preeminent rendezvous point for the league’s religious functions) as its original Canaanitic counterpart.
The origin and significance of the Yahweh cultus are controversial. Frank Moore Cross finds the origins of the name itself in an Ugaritic ephithet of El meaning “to cause to be,” “to create,” or “to procreate,” and likely starting out as a cult phrase “I AM that I AM” used in the worship of El.  The worship of Yahweh, as an epithet of El, may have originated among Midianite El-worshipers (El was worshipped as the chief god far to the south, in ethnically Canaanitic or Hebrew areas like Sinai).  This dovetails nicely with the fact that Moses was introduced to the worship of Yahweh by his future father-in-law Jethro, the High Priest of The LORD in Midian. The name Yahweh first appears, in written history, in Egyptian records and pottery fragments associated with Midian and Edom.  It first appeared as an independent name, rather than an epithet of El, in 14th and 13th century BCE lists of Edomite (south Palestinian) place names. 
Not controversial, however, is the basic consensus that he was grafted onto the earlier El worship and equated to El is not. And it’s telling that when the northern tribes revolted against the House of David, they endowed shrines to Yahweh with golden bull calves at Bethel and Dan. 
The social institutions of the Israelite society, as it emerged in marginal areas beyond the control of the Canaanite authorities, were in many ways an egalitarian peasant inversion of the lowland class system. In The Tribes of Yahweh, Gottwald originally stressed the origins of Israel in a straightforward peasant revolution and the egalitarianism of the society in areas of Israelite control. He later qualified these broad strokes, but kept the essence. Writing twenty years after the book’s first publication, he said:
My argument for the social equality of Israelites was muddled and imprecise, since there is evidence of status and wealth differentials, but the society was clearly less hierarchical than in the surrounding states and it provided extended family and clan-based “social safety nets” for those in greatest need. I have since come to speak of Israel’s tribal society as “communitarian”. Setting aside the mistaken notion that a peasant revolution is a dramatic one-shot event that succeeds or fails in one stroke, it may be reaffirmed that Israel was a peasant movement cast in opposition to city-state hierarchy and struggling for independence from outside control. The extent to which the social and political difference between Israel and it city-state neighbors can be called “revolutionary” depends, I believe, on how intentional the Israelite peasants were in pursuing and exploiting their independent manner of life. A great deal hinges on the extent to which the tribes of Israel were simply the haphazard result of a breakdown in dominant Canaanite institutions and the extent to which the tribes of Israel were consciously formed or shaped as an alternative to oppressive social and political institutions. My own belief is that there was both a breakdown and an intentional movement of peasants in the midst of that breakdown. Alternatively, the tribal system of early Israel may be conceived as a “devolution” from hierarchic society, facing backwards to a pre-state mode of life, or it can be conceived as both an “evolution” and a “revolution,” facing forwards in anticipation of modes of social and political freedom that were not yet realizable or sustainable under the conditions of antiquity. 
13 Hakim Bey, “T. A. Z.: The Temporary Autonomous Zone, Ontological Anarchy, Poetic Terrorism,” <http://hermetic.com/bey/taz3.html>.
14 The Anchor Bible: Joshua. Translation, notes by Robert Boling. Introduction by G. Ernst Wright (Doubleday, 1982), p. 330.
15 Ibid., pp. 83-84.
16 The Anchor Bible: Judges. Translation, notes, introduction by Robert Boling (Doubleday, 1975), p. 14.
17 Norman K. Gottwald, The Politics of Ancient Israel (Louisville, Kentucky: Westminster John Knox Press, 2001), p. 163.
18 Ibid., p. 165.
19 Nahum Sarna, Exploring Exodus: The Origins of Biblical Israel (New York: Schocken Books, 1986, 1996), xv.
20 Gottwald, The Politics of Ancient Israel, pp. 166-167.
21 Ibid., p. 167.
22 “Merneptah Stele,” Wikipedia <https://en.wikipedia.org/wiki/Merneptah_Stele>. Accessed October 2, 2013.
23 Gottwald, “Two Models for the Origins of Ancient Israel: Social Revolution or Frontier Development,” in The Quest for the Kingdom of God: Studies in Honor of George E. Mendenhall, ed. H. Huffmon et al. (Winona Lake, Ind. Eisenbrauns, 1983), pp. 6-7.
24 James Scott, The Art of Not Being Governed: An Anarchist History of Upland Southeast Asia (New Haven and London: Yale University Press, 2009), p. 305.
25 Ibid., p. 316.
26 Ibid., p. 316.
27 Gottwald, The Politics of Ancient Israel, p. 170.
28 Ibid., p. 300n.
29 Frank Moore Cross, Canaanite Myth and Hebrew Epic: Essays in the History of the Religion of Israel (Harvard University Press: Cambridge, Mass., 1973), p. 59.
30 Ibid., pp. 74. The house of Aaron (who fashioned the Golden Calf) was closely associated with Bethel. Ibid. p. 199.
31 Ibid., p. 39.
32 Ibid., p. 35.
33 Ibid., pp. 42-43.
34 Ibid., pp. 65-66, 68.
35 Ibid., p. 71.
36 The Anchor Bible: Joshua, pp. 119-120.
37 Cross, op. cit., p. 61.
38 Martin Smith, Palestinian Parties and Politics that Shaped the Old Testament (New York and London: Columbia University Press, 1971), pp. 22-23.
39 Gottwald, “Revisting The Tribes of Yahweh” (1999) <http://www.servicioskoinonia.org/relat/374e.htm#_ftn1>.